ODBC guide

Upload a file with original timestamp


Uploads a file and preserves the original creation/modified date. Set UseSourceFileTimeStamp to use the source file timestamp instead of the upload time.

SELECT * FROM upload_file
WITH (

      DriveId='me'
   --OR-- Use Shared Drive Id or other User's Drive Id
   --,DriveId='b!GtLN726LE0eXXXXXXXXXXXX'
   
     ,SourceFilePath='C:\My files\Employees\List.xls'
     
	 ,TargetFilePath='Uploads/Employees/List.xls'
	 
     ,ConflictBehavior = 'replace' -- fail, rename, replace (If File Exists Default=fail)
     ,UseSourceFileTimeStamp = 'true' --By default uploaded file set Current Date/Time for Creation/Modified date
     )
--DriveId can be retrieved by selecting from 'list_drives' endpoint.