Thanks Roberto for this info.
I will try to add the timestamp (from getmtime)  to the filename, put them 
in the watch folder, split the filenames after an upload to get the 
timestamp and add an extra field in the document version model. Maybe not 
the most elegant way but it is only for the initial bulk upload, for new 
documents the users have to add it manually through metadata.

Ben

On Wednesday, 13 September 2017 18:44:27 UTC+2, Roberto Rosario wrote:
>
> Hi,
>
> Yes, I think creation and last modification date are only readable via 
> filesystem calls in Python. I'll take a look at all the internal to see if 
> this is true. If the dates are somehow available they can be added as two 
> extra fields in the document version model with no compatibility issues. 
>
> On Sep 13, 2017 12:17 PM, "Ben" <[email protected] <javascript:>> wrote:
>
> Hi,
>
> Is there any way to access or save the modification date of an uploaded 
> file? I need to upload thousands of old documents and I am using a watch 
> folder for it. The upload works fine but the document timestamp is the time 
> when the document was added to Mayan. 
> It would be nice to have the modification date of the file to filter  
> searches. 
> I cannot find anything in Django: The UploadedFile class has only a few 
> attributes  ( name, size, ... ) but no modification date.
>
> Ben 
>
> -- 
>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Mayan EDMS" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to