Sending a File to Device Cloud in Python
A client application can send a file from any location on the device to which it has read access and add it to the global file storage or the file storage of a thing in Device Cloud.
As part of the file transfer function call, the application can specify optional parameters as follows:
-
a callback function to call after the file transfer completes successfully to perform any post-processing
-
whether to wait for the file transfer to finish and how long to wait, in seconds (by default, the application does not block and the timeout is zero)
To send files, the application must be connected to Device Cloud.
The application must have read access to the specified file and directory.
When the application calls the function, the file appears in Device Cloud in the storage location as specified in the file_global parameter. If a file with the same name exists in the storage location, it is overwritten.