Google Drive Document Time Stamp -


i assume modifieddate search field date of modification (obviously) or upload drive. there way preserve original creation date of file on native system? or there possibility modify field? thank you, sean

you can use file.update set modification date after upload.

https://developers.google.com/drive/v2/reference/files/update

also, file.patch works too:

https://developers.google.com/drive/v2/reference/files/patch

i know read old thread sometime discussed nice able preserve original creation date on insert, or @ least have option, functionality not exist yet. (can't find post now...)

update:

i decided nice have method update document time stamp, here is:

    public static file setlastmodified(string fileid, datetime lastmodified)     {         file file = driveservice.files.get(fileid).fetch();         file.modifieddate = lastmodified.tostring("yyyy'-'mm'-'dd't'hh':'mm':'ss.fff'z'");         try         {             filesresource.updaterequest request = driveservice.files.update(file, fileid);             request.setmodifieddate = true;             file = request.fetch();         }         catch (exception e)         {             throw;         }         return file;     } 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -