file/add
- Creates a new file.
Method parameters:
name
- The name of the file.
file
- The content file to upload.
parent_id
- The ID of the parent folder.
auto_rename
- Give the file a unique name if a file with the same name already exists.
Returns a JSON document of the following format:
<number> - The ID of the newly created file.
Expected errors:
ENTER_NAME
- The name is empty.
FILE_ALREADY_EXISTS
- A file with the name already exists.
PARENT_FOLDER_NOT_FOUND
- A parent folder with the ID doesn't exist.
SELECT_FILE
- The content file is empty.
FILE_ERROR
- An error occured while uploading the file.