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

get.php - lack of support for pwg_format located files (within Piwigo sites) #23

Open
extorn opened this issue Feb 16, 2021 · 1 comment

Comments

@extorn
Copy link

extorn commented Feb 16, 2021

Are you able to add support for serving files from the pwg_format folder (such as raw / psd / etc)?
This is supported within the standard piwigo server for the galleries (or other) sites.
to summarise,
if you create a folder in the galleries sub folder of your server, add a file named xyz.jpg and then a child folder pwg_format with a child file xyz.raw for example, then after synchronising, the pwg_format folder is a secret folder, but the items in that appear as download options for the file, a bit like derivatives file sizes.

In the website, the download of this alternative format file is handled by the actions.php file.
I'm trying to add support for this to the webservices api (in the PiwigoClientWsExt plugin for now).
I've got the pwg.images.getInfo to return the various formats, and I could give them any URI I wish I guess, but I thought the following seemed as logical as any:

//
where relative server path would be (for example): /galleries/test/pwg_format (presuming the main image is in test child folder of the galleries site)
filename could be <filename_wo_ext>.psd (for the .psd format file).

I'm not clear why handling these was done entirely differently to standard derivatives, but, given it is...

@extorn extorn changed the title get.php get.php - lack of support for pwg_format located files (within Piwigo sites) Feb 16, 2021
@extorn
Copy link
Author

extorn commented Feb 17, 2021

With the latest version of the android app, PiwigoClient, the uri requested gives the following error for my test file:

Fatal error: Uncaught Exception: Could not validate path (./galleries/galleries_test/pwg_format/20210203_074809.psd) actually belong to image (5415) (./_data/i/galleries/galleries_test/pwg_representative/20210203_074809) in /config/www/Piwigo-11.3.0/plugins/piwigo_privacy/helper_funcs.inc.php:25 Stack trace: #0 /config/www/Piwigo-11.3.0/plugins/piwigo_privacy/helper_funcs.inc.php(249): pwg_privacy_error('Could not valid...') #1 /config/www/Piwigo-11.3.0/plugins/piwigo_privacy/get.php(70): pwg_privacy_verify_access('5415', './galleries/gal...') #2 {main} thrown in /config/www/Piwigo-11.3.0/plugins/piwigo_privacy/helper_funcs.inc.php on line 25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant