I have an issue and can't figure out what's going on. If I run this code:
if ( empty( $_FILES['the_upload'] ) ) {
?>
<form enctype="multipart/form-data" method="POST" action="">
<p>
<label for="file">Upload File</label>
<input type="file" name="the_upload"/>
</p>
<p><input type="submit" name="submit-btn" value="Upload!"></p>
</form>
<?php } else {
$upload_name = $_FILES["the_upload"]["name"];
echo "<pre>";
echo "\n\n<b>Uploading $upload_name:</b>\r\n";
$meta = $dropbox->UploadFile( $_FILES["the_upload"]["tmp_name"], $upload_name );
print_r( $meta );
echo "\r\n done!";
echo "</pre>";
}
I get a form, select my file and click Upload and it uploads the file to my dropbox without issues; however, if I run this code:
$upload_name = 'File_000.jpeg';
echo "<pre>";
echo "\n\n<b>Uploading $upload_name:</b>\r\n";
$meta = $dropbox->UploadFile( '/Users/Shared/test', $upload_name );
print_r( $meta );
echo "\r\n done!";
echo "</pre>";
The file uploads to my dropbox; however, it has 0 bytes and isn't really uploading the file. Any ideas on what could be the issue?
Thanks in advance!
Jordon