EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #10192


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Renaming files


CAUTION: This e-mail originated outside the University of Southampton.

Hi everyone,

 

We would like to rename files automatically when they are deposited, following a naming convention. I tried to work with the sanitize option but I had two major issues : the first one is that this option doesn’t give access natively to either the eprint or the doc objects. I can derive the eprintid from the http request, but the other issue is that this filter is applied when the file is first uploaded, meaning that basic metadata of the document is not set yet, and some of the data is required to rename files accordingly.

 

The renaming has to be applied when the document is deposited and all of its metadata is filled. The documentation for the document or the file objects doesn’t include any rename function and I haven’t been able to find a way to apply the filter from the document_fields_automatic functions either. I supposed I could create a new file with the new name and remove the old one, but all my attempts have been unsuccessful.

 

Any help?

 

Thank you!

 

Robin Sylvestre
Technicien des systèmes informatisés
Bibliothèque Louise-Lalonde-Lamarre
Polytechnique Montréal
514-340-4711 poste 5973