src/Dropbox/Dropbox.php
public function simpleUpload($dropboxFile, $path, array $params = [])
    {
        //Make Dropbox File
        $dropboxFile = $this->makeDropboxFile($dropboxFile);

        //Set the path and file
        $params['path'] = $path;
        $params['file'] = $dropboxFile;

        //Upload File
        $file = $this->postToContent('/files/upload', $params);
        $body = $file->getDecodedBody();

        //Make and Return the Model
        return new FileMetadata($body);
    }
public function simpleUpload($dropboxFile, $path, array $params = [])
    {
        //Make Dropbox File
        $dropboxFile = $this->makeDropboxFile($dropboxFile);

        //Set the path and file
        $params['path'] = $path;
        $params['file'] = $dropboxFile;

        //Upload File
        $file = $this->postToContent('/files/upload', $params);
        $body = $file->getDecodedBody();

        //Make and Return the Model
        return new FileMetadata($body);
    }
public function simpleUpload ( $ dropboxFile , $ path , array $ params = [ ] ) { //Make Dropbox File $ dropboxFile = $ this -> makeDropboxFile ( $ dropboxFile ) ; //Set the path and file $ params [ 'path' ] = $ path ; $ params [ 'file' ] = $ dropboxFile ; //Upload File $ file = $ this -> postToContent ( '/files/upload' , $ params ) ; $ body = $ file -> getDecodedBody ( ) ; //Make and Return the Model return new FileMetadata ( $ body ) ; }
Upload a File to Dropbox in a single request

@param  string|DropboxFile $dropboxFile DropboxFile object or Path to file
@param  string             $path        Path to upload the file to
@param  array              $params      Additional Params

@link https://www.dropbox.com/developers/documentation/http/documentation#files-upload

@return \Kunnu\Dropbox\Models\FileMetadata
Upload a File to Dropbox in a single request