Aaron Fisher
Aaron Fisher

Reputation: 645

Possible to create and write to a file on Dropbox via API?

Is it possible to create a file on Dropbox via the API and write to it directly? My current solution is to create a temp file locally, write to it, upload it and then remove the temp file.

I've only been able to find references on the Dropbox documentation to uploading files and not creating files, so I assume the above isn't possible, but would love to know if anyone has found a way.

Thanks in advance!

Upvotes: 0

Views: 803

Answers (1)

user94559
user94559

Reputation: 60143

I don't understand what distinction you're drawing between "creating files" and "uploading files." You can certainly create/upload a file via the Dropbox API. See /files_put. Since you tagged this with PHP, the relevant methods in the official PHP SDK are uploadFile and uploadFileFromString.

Upvotes: 1

Related Questions