Daniel-KM / Omeka-S-module-ArchiveRepertory

Omeka S module that allows to keep original names of files and to put them in a hierarchical structure (collection / item / files) in order to get readable urls for files and to avoid an overloading of the file server.
Other
2 stars 3 forks source link

Module not working with Rest Api #5

Closed MAG-Florian-Chevalier closed 2 years ago

MAG-Florian-Chevalier commented 4 years ago

If I add a new media with Rest Api, the corresponding file doesn't go in any repertory and its name is still generated in the same way it is without the module. Is it a normal behaviour ? If so, do you plan to add the functionality with api in a future release ? Currently using Omekas 3

Thanks

Daniel-KM commented 4 years ago

No, it's not a normal behaviour, but I never check it. It works with forms and import modules, so there is no reason it doesn't work with rest api, that uses the same internal api.

flotho commented 3 years ago

Hi @Daniel-KM ,

best wishes,

did you reproduce/confirm the issue ?

Regards

MAG-Florian-Chevalier commented 3 years ago

Hi,

I've done some testing about this issue and read the code. The attached listeners are only on Item creation / update / deletion. The thing is that when I'm adding a media (with a Post on api/media), it seems that the listeners aren't triggered so the file doesn't have the repertory I need. If I then save the item which contain the media, the path of the file will be correct. Is there a way to trigger this module functionality on media creation / update / deletion too ?

Regards,