Code Monkey home page Code Monkey logo

Comments (30)

cracker0dks avatar cracker0dks commented on July 26, 2024

no problem on my end, running always behind a nginx. Maybe you can not upload because of folder permissions?

from whiteboard.

spiral6 avatar spiral6 commented on July 26, 2024

I'll take a look and confirm it.

from whiteboard.

spiral6 avatar spiral6 commented on July 26, 2024

Permissions on the folder are fine, but I'm getting this error.

Cannot GET /uploads/myNewWhiteboard_1559079930153.png

from whiteboard.

cracker0dks avatar cracker0dks commented on July 26, 2024

have you checked that the file exists on the server? I have no clue how to reproduce this

from whiteboard.

spiral6 avatar spiral6 commented on July 26, 2024

I attempted a copy and paste again just to check.
The file does not exist on the server. I guess the file isn't being created/uploaded properly?

from whiteboard.

cracker0dks avatar cracker0dks commented on July 26, 2024

if file upload fails, you should get an error msg in the server console log.
Should be like this:
image

I also added more error logs to the latest version, maybe we get this problem solved this way

from whiteboard.

spiral6 avatar spiral6 commented on July 26, 2024

Downloaded and installed the new release. Got this message.

image

Same error though. No uploads folder this time.

from whiteboard.

cracker0dks avatar cracker0dks commented on July 26, 2024

Wut?! Do you upload the img from the harddrive, browser or something else?

from whiteboard.

spiral6 avatar spiral6 commented on July 26, 2024

I just copied and pasted the image into the whiteboard (on the site).

Feel free to try it at http://spiral6.xyz/whiteboard

from whiteboard.

spiral6 avatar spiral6 commented on July 26, 2024

Note that dragging images in does work, as a matter of fact. Just not copy and pasting them.

from whiteboard.

spiral6 avatar spiral6 commented on July 26, 2024

Here's the relevant location directive in my NGINX configuration.

location /whiteboard/ {
        proxy_set_header HOST $host;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection upgrade;
        proxy_pass http://192.168.1.104:8080/;
    }

from whiteboard.

cracker0dks avatar cracker0dks commented on July 26, 2024

Config an stuff looks good. I will test the copy+past thing on my installation.

from whiteboard.

spiral6 avatar spiral6 commented on July 26, 2024

Local installation copy and paste also doesn't work. I just ran it without NGINX, directly from the local IP.

from whiteboard.

cracker0dks avatar cracker0dks commented on July 26, 2024

but only copy+past ?

from whiteboard.

spiral6 avatar spiral6 commented on July 26, 2024

Yeah, drag and drop works fine on both local and NGINX proxy.

from whiteboard.

cracker0dks avatar cracker0dks commented on July 26, 2024

looked into it. The Probelem you might encounter is not really a bug. You can not upload files from the filesystem directly. It works if you open the image in paint or an other image software, then mark and copy it to the whiteboard. If you copy+past from the filesystem you have the file path in the clipboard, not the image data. Browsers don't allow direct file access.

I added a info modal for that problem to make it clear to the user.

The Problem also explained here: https://stackoverflow.com/questions/45728177/copy-and-paste-file-in-javascript

from whiteboard.

spiral6 avatar spiral6 commented on July 26, 2024

I wonder how Imgur does it then.

from whiteboard.

spiral6 avatar spiral6 commented on July 26, 2024

And I wasn't copying and pasting from the filesystem. I was copying and pasting images in my browser using Copy Image. Like so.
image

from whiteboard.

cracker0dks avatar cracker0dks commented on July 26, 2024

this should work (And is working for me). Can you send me the Image url for testing?

from whiteboard.

spiral6 avatar spiral6 commented on July 26, 2024

This is the problem with any image, but in this case, I was using my GitHub avatar.
https://avatars0.githubusercontent.com/u/2887489?s=88&v=4

from whiteboard.

cracker0dks avatar cracker0dks commented on July 26, 2024

Thanks. Found a bug and I think I fixed it here with this changes a7c02ac
In some cases the image url was not detected correct and so the Image url was uploaded as if it was base64 image data.

from whiteboard.

spiral6 avatar spiral6 commented on July 26, 2024

I tried it again. It did not work. I updated the server to the latest source code that you committed, but no dice. http://spiral6.xyz/whiteboard

My server is setup with Cloudflare, NGINX and then proxy-passing to the local IP that this application is hosted on.

from whiteboard.

cracker0dks avatar cracker0dks commented on July 26, 2024

seems to be a upload problem. The Image data is vaild on client side. On the way to the server something seems to happen to the base64 data.
You can check out my test Server: http://167.86.87.115:3334/
I cant reproduce it there (and also not an a different server behind a rp), only on your site. I can't debug it deeper on your link as the client side (where everything looks good)

Is this still buggy for you localy? If not, try to test without the reverse proxy once.

from whiteboard.

spiral6 avatar spiral6 commented on July 26, 2024

Does not work locally, which is without reverse proxy.

Using local IP address 192.168.1.104:8080.

Tried with both Firefox and Opera, same results.

from whiteboard.

cracker0dks avatar cracker0dks commented on July 26, 2024

is it working on my testserver for you?

from whiteboard.

spiral6 avatar spiral6 commented on July 26, 2024

Yes.

from whiteboard.

spiral6 avatar spiral6 commented on July 26, 2024

My guess is that it's a permissions issue? Maybe the uploads folder isn't getting written because of permissions? Though setting the entire folder and files as 777 doesn't seem to work.

It just says uploaded but there isn't any uploads or uploads folder.

from whiteboard.

cracker0dks avatar cracker0dks commented on July 26, 2024

It has to be a problem with your machines. Are you running with docker?

from whiteboard.

spiral6 avatar spiral6 commented on July 26, 2024

Nope, just running a container in Proxmox.

from whiteboard.

cracker0dks avatar cracker0dks commented on July 26, 2024

maybe run it with sudo for testing, then with docker. I think the problem is a os thing, nothing I can fix on my end...

from whiteboard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.