cameroncros / OctoPrint-DiscordRemote

Discord plugin for OctoPrint
MIT License
66 stars 34 forks source link

Wrong download Path in "-files" and "-getfile" bug. #173

Closed Dragonking3x closed 2 years ago

Dragonking3x commented 3 years ago

The Download Path in the "-files" command is wrong. If I use the "-getfile" command, it can't find a file or don't answer. I believe these 2 bugs are connected.

"-files" picture

"-getfile" picture

It looks like, DiscordRemote doesn't like it if I make folders in folders.

cameroncros commented 3 years ago

Can you try uploading and retrieving a file without underscores? I suspect the underscores are messing it up. There may not be an easy fix on my end for that though.

On Thu, Jan 21, 2021 at 12:02 PM Dragonking3x notifications@github.com wrote:

The Download Path in the "-files" command is wrong. If I use the "-getfile" command, it can't find a file or don't answer. I believe these 2 bugs are connected.

"-files" picture http://drive.google.com/uc?export=view&id=1JPife60LOgvOJ2jslWfCN9IP50CT-N9d

"-getfile" picture http://drive.google.com/uc?export=view&id=1C2MjMfeWFlOMxDI6mTplj7WO7jHgw6R4

It looks like, DiscordRemote doesn't like it if I make folders in folders.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cameroncros/OctoPrint-DiscordRemote/issues/173, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAK7FL64MSXRXMSKZ5VQ52LS254JFANCNFSM4WL2FSCQ .

Dragonking3x commented 3 years ago

It looks like that OctoPrint has the same problem now. The underscore is not the problem. OctaPrind and DisccordRemote can handle it fine. The main problem exists if I make a Folder in a Folder. It looks like, Octoprint looks at the folder, where the file is in, and only makes with the folder+FileName the download string. Because I have Folder+SubFolder+FileName, It doesn't work.

Picture

I will write OctoPrint about it, but if use the file name of OctoPrint, the bug should be fixed after Octoprint fixed the bug.

cameroncros commented 3 years ago

Can you try doing -print with just the filename, and without the preceding path? I have a feeling that may work, but I haven't looked at it yet. Let me know if you find out anything.

On Fri, 22 Jan 2021, 11:40 am Dragonking3x, notifications@github.com wrote:

It looks like that OctoPrint has the same problem now. The underscore is not the problem. OctaPrind and DisccordRemote can handle it fine. The main problem exists if I make a Folder in a Folder. It looks like, Octoprint looks at the folder, where the file is in, and only makes with the folder+FileName the download string. Because I have Folder+SubFolder+FileName, It doesn't work.

Picture http://drive.google.com/uc?export=view&id=1oWccwv6bYDlwPDjYGpwHNA9pE1JGioFd

I will write OctoPrint about it, but if use the file name of OctoPrint, the bug should be fixed after Octoprint fixed the bug.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cameroncros/OctoPrint-DiscordRemote/issues/173#issuecomment-765034164, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAK7FL4CVOJJGQIKOBGUWK3S3DCO5ANCNFSM4WL2FSCQ .

Dragonking3x commented 3 years ago

Sorry I forgot to set the right's right for the last picture.

"-print" doesn't work if I only use the filename.

-print

The problem is this. Normally the link would look like this. 192.168.1.57/downloads/files/local/pat/test/wrench.gcode

Sometimes, Otoprint had a problem and the link look like this. 192.168.1.57/downloads/files/local/test/wrench.gcode

The second link is wrong because it misses the "pat" folder in the link. It doesn't happen all time, but I just found it after I tried to test the download with DiscordRemote. If you use the file path that Octoprint gives you, you will have the same wrong link. If you search for the file path yourself, it will be always wrong, if you only look at the foldername+filename.

btw. I use the Ocoprint image to install Octoprint on my Raspberry.