Changeable "last-modified" file property on Azure File Service
At the moment, our application stores its documents in a normal folder on a network share. The “Last Modification Time” of the files are important for internal version-handling, and our application heavily uses this file-property.
Now we decided to move our documents into the cloud and we started using Azure File Service Preview. When we upload the documents via REST API, the “Last-Modified” property of the uploaded files get the current-time – that’s reasonable.
But unfortunately afterwards the “Set File Properties” REST API call (https://msdn.microsoft.com/en-us/library/azure/dn166975.aspx) does not support the change of the “Last-Modified” property. (I tried both with “Last-Modified” and “x-ms-last-modified” headers – even worse: the “Last-Modified” property gets the current time of the “Set File Properties” HTTP-call; the last-modified value should change only when the file content changes, not the properties or metadata).
Please provide a user/client ability (via REST API) in Azure File Service to change the “Last-Modified” file property value – even back in time.
Otherwise our application just cannot use Azure File Service for cloud purposes.
Thanks for this feedback. Long term, we would like the File REST API for Azure Files to be a superset of the functionality available in SMB. In the short term, we are looking to close some of the gaps in the API that are most painful, like the file attributes that you can set via SMB but not File REST.
We would appreciate further feedback on this item, in particular feedback on the things that you can do today over SMB but not REST to help us prioritize the order in which we close the gap!
Program Manager, Azure Files
Senthil Kumar K commented
Any timeline when this would be available?
April Hazel commented
I tried to change a file's modified date in databricks python by running the following syntax and it did not work. I believe it is because of this problem
os.utime('/dbfs' + datalakeversion2location + '/' + fn.name,times=(modified_date_int, modified_date_int))
The same issue, I need the last modified data to be preserved, but when I copy a file from local drive to the network drive (which is azure blob storage) the last modified date of the file gets changed even if the contents of the file are not edited. Please suggest a way to get this done.
Fabian Bassing commented
Please add this feature.
I thinks the same request applies to the Etag Attribute.
Agreed. Not having a means to upload a file to blob storage and retain the actual last modified date is a non-starter for us. We have a current project that requires storing about 62 TB of media files in Azure, and our only option at the moment is to use Azure File Storage and pay over 6x the price of blob.
Lester W commented
Yes, Please add the ability to preserve the "last modified" date attribute for a file. We use Azure storage as a file archive (by using Storage Explorer) and it is most annoying that the last modified date for the file is not preserved as a meta attribute.
It would also be great if even before this functionality is added in the API, that Azure Storage Explorer would start storing a files original Last Modified date as a meta attribute NOW.