Skip to content
Shane Barbetta edited this page Jul 25, 2018 · 9 revisions

Methods for uploading and managing data files (technically a subset of the Scripting API).

Method summary

list()

  List all files in account

retrieve()

  Retrieve file info

delete()

  Delete a file

upload()

  Upload a file

list()

List all files in account

Example:

c.file().list()

retrieve()

Retrieve file info

Example:

c.file('file_id').retrieve()

delete()

Delete a file

Example:

c.file('file_id').delete()

upload(string file_path, string mime_type)

Upload a file

Arguments:

  file_path - Path to the file on the system making the request

  (optional) mime_type - The file's MIME type. The client will guess if not specified

Example:

c.file().upload('~/myfile.txt', 'text/plain')

Clone this wiki locally