ODBC guide

Upload a file


Uploads a file. Supply the local file path and target drive or folder in the WITH clause.

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='List.xlsx'	 --Upload on Root (Create -or- Overwrite if ConflictBehavior = 'replace')
   
   --,TargetFilePath='myfolder/List.xlsx' --Upload under some folder
   
   --OR-- use Target File Id
   --,TargetFilePath='01SUOJPKGJXIXXGXACFVDK3QH5JYARFOMB' --Overwrite Exising File Id
   
   --,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.