I have a form that allows a user to fill in several aspects and then choose a file to upload.
When the form is submitted, I want write some code that saves the file
There is section in the Core API manual, see this link. So you can use the upload part like this:
$f = file_get_contents('data.txt'); $result = $dbxClient->uploadFile("/data.txt", dbx\WriteMode::add(), $f); echo 'file uploaded';