Piwigo / Piwigo-Mobile

Piwigo iOS Mobile Application
MIT License
98 stars 29 forks source link

Download Fails? #143

Closed mhinch closed 7 years ago

mhinch commented 7 years ago

Piwigo Mobile, Version 2.0.3, iOS 10, iPad. I selected an image and did "Download". A graphic appeared that "filled" the picture, eventually indicating 100%, then a error message saying "Fail Saving Image failed to save image. Error: Data unavailable" appeared. The image itself is not "Photos" as I would expect it to be. Any thoughts?

EddyLB commented 7 years ago

@mhinch, Data unavailable generally means that the image is corrupted on the server (high resolution version in that case). Could you please check on the server side ? If the high-resolution version of the image is available, what is the format and size ?

mhinch commented 7 years ago

Sorry, but all looks OK to me:

File size seems about right: /g2data/piwigo/upload/2017/06/11$ ls -la 542 -rw-r--r-- 1 www-data www-data 5081233 Jun 11 08:40 20170611084034-73b60542.jpg

file command parses the header correctly: /g2data/piwigo/upload/2017/06/11$ file 542 20170611084034-73b60542.jpg: JPEG image data, Exif standard: [TIFF image data, little-endian, direntries=9, manufacturer=Canon, model=Canon EOS DIGITAL REBEL XT, orientation=upper-left, xresolution=16 0, yresolution=168, resolutionunit=2, datetime=2017:06:03 14:59:50], baseline, precision 8, 3456x2304, frames 3

jpeginfo says file is not corrupt: /g2data/piwigo/upload/2017/06/11$ jpeginfo -c 542 20170611084034-73b60542.jpg 3456 x 2304 24bit Exif N 5081233 [OK]

All derivatives are also OK: /g2data/piwigo/_data/i/upload/2017/06/11$ jpeginfo -c b60542 20170611084034-73b60542-2s.jpg 240 x 160 24bit JFIF P 25226 [OK] 20170611084034-73b60542-cu_s9999x200.jpg 300 x 200 24bit JFIF P
38336 [OK] 20170611084034-73b60542-la.jpg 1008 x 672 24bit Exif P 381893 [OK] 20170611084034-73b60542-me.jpg 792 x 528 24bit Exif P 251643 [OK] 20170611084034-73b60542-sq.jpg 120 x 120 24bit JFIF P 10450 [OK] 20170611084034-73b60542-th.jpg 144 x 96 24bit JFIF P 9958 [OK] 20170611084034-73b60542-xl.jpg 1224 x 816 24bit Exif P 537756 [OK] 20170611084034-73b60542-xs.jpg 432 x 288 24bit JFIF P 74746 [OK]

Also, I tried one of two other downloads with the same result.

Other ideas?

On 6/12/2017 2:00 PM, Eddy Lelièvre-Berna wrote:

@mhinch https://github.com/mhinch, |Data unavailable| generally means that the image is corrupted on the server (high resolution version in that case). Could you please check on the server side ? If the high-resolution version of the image is available, what is the format and size ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Piwigo/Piwigo-Mobile/issues/143#issuecomment-307887585, or mute the thread https://github.com/notifications/unsubscribe-auth/AP4XGzvsvSpqPs9EAhbabZUbvKbb7kpbks5sDYrTgaJpZM4N3iB-.

EddyLB commented 7 years ago

Do you encounter issues with other images ?

mhinch commented 7 years ago

Yes. When I attempt to download other images I encounter the same "Fail Saving Image" error. While I have not made an exhaustive set of attempts, I've tried 5+ images that are old and new -- all result in the same failure.

FWIW - the download graphic and time is quite convincing. It appears that a download is really happening: the graphic takes several seconds to fill, which seems about the right amount of time to move 5MB in my environment. It feels like the problem is on the write side. Is there a special config I need to allow piwigo-mobile to write into my Photo album (is that where it's going?)?

mhinch commented 7 years ago

Problem resolved. Indeed this is a configuration issue. Settings->Privacy->Photos->Piwigo must be turned on. Then downloads succeed. Sorry to not have tipped to this sooner.

Thanks A LOT for restarting work on this app!!!!
(I'm hoping that a search capability is in the roadmap someplace -- my 21000 photos and I would appreciate it!)

EddyLB commented 7 years ago

@mhinch, thank you for reporting. The app asks the user to allow Piwigo to access Photos.app the first time it is launched and does not verify later whether it has access to Photos.app. The problem you have encountered shows that the way Piwigo Mobile asks access to Photos.app should be improved. Added to the roadmap!

Yes, search capability is in the roadmap together with some reorganisation of the interface.

EddyLB commented 7 years ago

Implemented with https://github.com/Piwigo/Piwigo-Mobile/commit/c3b7332f6980928a0740da89320278d68c6625a7.