[BUG] — pwg.categories.getList does not return freshly uploaded images in v12 #1367

Closed
opened 2026-10-05 00:41:00 +02:00 by adam · 3 comments
Owner

Since Piwigo 12, a third-party app must call pwg.images.uploadCompleted to empty the lounge. If it calls it at the end of a series of uploads, calling pwg.categories.getList before the end of the series does not return already uploaded images.

With an app appending each image in its album as soon as it is uploaded (in cache), this leads to the situation where already uploaded images are removed from the album view when the user tries to refresh the album content or kills/restarts the app. And if the app uploads images in the background and the user launches the app before the upload series is completed, none of the uploaded images are visible.

It is possible to edit the properties of an image with pwg.images.setInfo before emptying the lounge. Similarly, the method pwg.categories.getList should return all images even if the lounge has not been emptied yet.

Since Piwigo 12, a third-party app must call `pwg.images.uploadCompleted` to empty the lounge. If it calls it at the end of a series of uploads, calling `pwg.categories.getList` before the end of the series does not return already uploaded images. With an app appending each image in its album as soon as it is uploaded (in cache), this leads to the situation where already uploaded images are removed from the album view when the user tries to refresh the album content or kills/restarts the app. And if the app uploads images in the background and the user launches the app before the upload series is completed, none of the uploaded images are visible. It is possible to edit the properties of an image with `pwg.images.setInfo` before emptying the lounge. Similarly, the method `pwg.categories.getList` should return all images even if the lounge has not been emptied yet. <!-- github-sync-id:1053017332 -->
adam closed this issue 2026-10-05 00:41:00 +02:00
Author
Owner

I like the idea to queue uploaded images in a lounge, but this lounge should not be a room waiting for an external trigger.
Images should be processed in a background or parallel thread to keep the server reactive. The server knows when images are uploaded and should trigger the process himself.

I like the idea to queue uploaded images in a lounge, but this lounge should not be a room waiting for an external trigger. Images should be processed in a background or parallel thread to keep the server reactive. The server knows when images are uploaded and should trigger the process himself. <!-- github-comment-id:968564891 -->
Author
Owner

Similarly, the method pwg.images.uploadAsync does not return the category in which the image is supposed to be uploaded. The category field is empty, certainly because the image is not inside the album until the pwg.images.uploadCompleted method is called.

Similarly, the method `pwg.images.uploadAsync` does not return the category in which the image is supposed to be uploaded. The category field is empty, certainly because the image is not inside the album until the `pwg.images.uploadCompleted` method is called. <!-- github-comment-id:1004228832 -->
Author
Owner

Inefficient but working solution: empty the lounge after each single upload.

Inefficient but working solution: empty the lounge after each single upload. <!-- github-comment-id:3625325197 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1367