VDigital wrote1 - Does that mean you are creating a rule where site = 1 has to exist
No new rule. During install.php, site "1" is created. Read install.php :-)
VDigital wrote(Why in the future you can't removed it to leave only 2, 3, ... which could ever be local sites)?
You can, but who said you couldn't change the configuration parameter for upload too?
VDigital wrote2 - Does that mean your users would be able to upload in a distant site (a non local one)?
Certainly not, it would be another level of complexity that I don't want to solve right now.
VDigital wrote3 - If today, without your new API, your gallery is structured like this:
./galleries/upload/2005-05/xxxxxx.jpg with only 1 directory already called upload with many subfolders
What about upgrade? Is that your upload directory suit you for the API?
If the user keep the default configuration parameters, web API uploaded photos will be uploaded in ./galleries/upload.
VDigital wroteFrom my point of view, your "upload directory" must one of the current available local directory anywhere in the tree and decided by the webmaster.
What if the user don't ever want to FTP connect and create a directory? This "web API way" to upload photo is designed to be used exclusively, I don't want to force the user to use FTP to upload anything.
VDigital wroteIt isn't us to choose directory names in case of upload, it is the webmaster.
We can play with the data model, but we have to leave totally open-minded the physical model.
This is the way it was designed since the beginning. But it was also because directories were strongly linked to categories. If we change this link from mandatory to optionnal, I think it's ok because what the user really wants it to be free on the category hierarchy, I am not so sure he minds the directory tree if another tool do the job automatically (thanks to the web API method pwg.images.add).
The way Piwigo dispatches photo files could be considered as internal mechanics.
VDigital wroteAll contraints we have already introduced have to be removed.
My proposition is to remove constraints, not to add some!
For now (with minimum changes) another way to solve the problem can be that photo must be uploaded in a "storage category". Another web API could be "pwg.category.create" with an option to create the corresponding directory.
Please consider this web API method to be used by the webmaster, not by gallery guests. My goal is that webmasters use the web API to upload their photos, no FTP upload, no thumbnail creation, no synchronization. Such a tool is under preparation, I think it will make first steps with Piwigo much more easy than the current process.