cakebox icon indicating copy to clipboard operation
cakebox copied to clipboard

File Upload Fails

Open majorette opened this issue 13 years ago • 5 comments

Hi Shama,

when uploading files by using files_put dropbox returns "Call requires one of the following methods: PUT, POST, got GET!". It seems that cakebox send http GET although Dropbox API requires PUT.

Best regards, Majorette

majorette avatar Oct 11 '12 18:10 majorette

Hmm I'll take a look. Thanks for reporting!

shama avatar Oct 12 '12 03:10 shama

function cp() not working it throws an internal error Not found An Internal Error Has Occurred. I am calling in this way from my controller in following way. $conds = array( 'from_path' => 'www/uploads/public_uploads/bala/2012/11/20/1_Rugcu.jpg', 'to_path' => 'app/1_Rugcu.jpg', ); $files = $this->DropboxApi->cp($conds); www/uploads is my project directory. Under webroot directory I have created a folder named public_uploads inside all other sub-folders exists. Kindly let me know whether I am calling in a right way or the plugin has an issue. Kindly let me know how can I solve it.

jhon312020 avatar Nov 21 '12 13:11 jhon312020

public function cpydropbox() { $files = $this->DropboxApi->ls('Photos'); $f = $files['Dropbox']['contents'][1]['path']; $this->DropboxApi->cp(array( 'from_path' => WWW_ROOT."uploads/images/tiger-picture.jpg", 'to_path' => "$f", )); i am also getting the same error , NOt FOUND AN INTERNAL ERROR HAS OCCURED, Please help . $f is the path to dropbox photos ...

sharma1989 avatar May 06 '13 12:05 sharma1989

Patches welcome!

shama avatar May 06 '13 16:05 shama

Hello. Dropbox return "Not found" when API url is wrong; DropboxApi datasource append /{root}/{path} in URL for all requests (and this is wrong). For example, /files_put need root and path in query string.

My branch feature/files_put https://github.com/hiryu85/cakebox can solve this problems

hiryu85 avatar Jan 29 '14 04:01 hiryu85