Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download Photo Fails #2389

Closed
JasonNaughton opened this issue Aug 5, 2021 · 6 comments
Closed

Download Photo Fails #2389

JasonNaughton opened this issue Aug 5, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@JasonNaughton
Copy link

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Install next cloud 21.0.3 under linux Mint 20.2
  2. Have Photos 1.3.0 App installed and configured
  3. Upload multiple photos
  4. Click on Photos to view photos
  5. Click on any photo top right ...
  6. Click Download (Photo will Fail with "Failed - Network error")
  7. Click on any photo top right ...
  8. Now remove spaces in the filename, photo downloads correctly

Expected behaviour

Seems that if you attempt to use the download option and leave spaces within the file name. In my example the file name was 21-08-05 15-28-29 2148.jpg. Yet if I change the filename and remove the spaces in the process of downloading there's no issue.

Actual behaviour

See above.

Server configuration

Operating system:
Linux Mint 20.2

Web server:
Apache 2.4.41

Database:
Mysql 8.0.26

PHP version:
PHP 7.4.3

Nextcloud version: (see Nextcloud admin page)
21.0.3

Updated from an older Nextcloud/ownCloud or fresh install:
Regularly updated but this error I don't believe is an update issue.

Where did you install Nextcloud from:
From git repository.

Client configuration

Browser:
Chrome 92.0.4515.131

Operating system:
Linux Mint 20.2

@CarlSchwan
Copy link
Member

Hi :)

Thanks for the report. I tried to reproduce with Nextcloud master and Nextcloud 21 but I couldn't. For me downloading a file even with a space in the filename works as expected.

Did you upload the images with the desktop client or with the online interface? Do you get some error messages in the webconsole (right client -> inspect -> console)?

@szaimen
Copy link
Contributor

szaimen commented Aug 8, 2021

Maybe an issue within the photos app?

@szaimen szaimen transferred this issue from nextcloud/server Aug 8, 2021
@pspitzli
Copy link

I just upgraded my nextcloud instance from 24.x to 25.x (HUB 3.0) and reactivated Photos-2.0.0.
I was super excited to test the new editor.

Unfortunately the editor did not work for me and I think it has to do with this bug.

Whenever I try to open the Editor for a foto I end up on a black, empty editor.
Further investigation in the browser console (I am using firefox, so F12 or CTRL-SHIFT-I got me there) revealed that the editor failed to download the original image under a URL following the following sceme:
https://<HOST>/remote.php/dav//Photos/Ausdrucken/<IMAGE_NAME>.jpg
This URL was not valid and the server and thus a 404 Error was returned.

The I tried to download the image -> Same result, same URL Scheme.
The I tried to download the image in the Files-App, which worked instantly.
It turned out that the Files-App used a different URL-Scheme do download the very same image:
https://<HOST>/remote.php/webdav//Photos/Ausdrucken/<IMAGE_NAME>.jpg
Notice the webdav instead of just dav in the path.

Now I went to github to search for similar issues and found this one.
But Just as I wanted to prepare this very comment and copy the failing URLs from the browser console, the issue was gone!
It just worked as expected, which was basically cool but left me puzzled.

I looked at the download path again and noticed a change:
It had turned from
https://<HOST>/remote.php/dav//Photos/Ausdrucken/<IMAGE_NAME>.jpg
to
https://<HOST>/remote.php/dav//files/philip/Photos/Ausdrucken/<IMAGE_NAME>.jpg

I still wanted to share this observation.
Maybe there is some cronjob running in the background, updating paths in the db or whatever.
Maybe the issue also disappeared for @JasonNaughton too after the URLs got updated?

@kariburger
Copy link

I have the same problem.
I have some photos in a "group folder" . Displaying works fine EVERYWHERE.

Download works in the main view "all media" (German: "Alle Medien"), when I enter the "photos app".
But when I navigate to "shared with you", I can only SEE the photos in the group folder.
But DOWNLOAD does NOT work.
I discovered the same problem with the differing paths (compared the paths with download from the file manager app).

My example:

  • Working download of photo matches with following path in nginx access log:
    "GET /nextcloud/remote.php/dav// files/USERNAME/ PATH" ((added space so that highlight works))
  • Failing path in "shared with you" lead to the following path in nginx access log:
    "GET /nextcloud/remote.php/dav//PATH"

So something causes the part "files/USERNAME" to get lost inside the photos app.
I used an external storage entry for the photos before - with the same error there.

I'm using Nextcloud Hub 3 (25.0.4) on a debian system with php7.4 (I can't switch to php8 due to openmediavault, which sticks to php7.4).

@math-GH
Copy link

math-GH commented Mar 18, 2023

I am affected too.

grafik

Nextcloud 25.0.3

How to reproduce:
grafik

grafik

The download link opens an empty tab.

An error is shown in the browser console: 404 - not found - https://domain.tls/remote.php/dav//filename.jpg (yes, there is a double slash char)

correct would be:
https://domain.tld/remote.php/dav/files/USERNAME/FOLDERS/filename.jpg (files/USERNAME/FOLDERS is missed)

@joshtrichards joshtrichards added the bug Something isn't working label Aug 19, 2023
@joshtrichards joshtrichards transferred this issue from nextcloud/photos Aug 5, 2024
@joshtrichards
Copy link
Member

The original report was about spaces in the filenames. This was never reproduced and there was no response from the reporter to the followup in #2389 (comment) >3 years so I'm closing this.

@pspitzli @kariburger @math-GH If you're still experiencing anything like your comments, which may or may not have any relation to the original report, please create a dedicated issue.

@joshtrichards joshtrichards closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants