Please I want to be able to upload a zip file from my server to my drop box account, i have setup the dropbox filesystem in Laravel 5 and it working well, I can put a file and also can read a file, but the problem now is, i don't know which of the filesystem methods to use if i want to upload my zip file located in my server to my dropbox account. Please help.
Did you use the disks like ->disk('dropbox') vs. ->disk('local')? For an example check Jeffery's tutorial Multiple Filesystems, the video explains the multi disk functionality pretty well.
Yes i did
$filesystem->disk('dropbox')->put('test.txt', 'hello');
and its working very well, but in this situation I am not reading and updating the content of the file, all i just want to do is to upload the zip file to Dropbox server. I have tried the other methods but didn't work e.g:
get()
prepend()
append()
copy()
move()
etc, please i don't know if there is an upload() method.
Ok, but what am actually looking for is a method that can upload a file to drop box from my local server, so far i have tried the move and copy for dropbox but where it states that i should put the from path, if i use a local file path it will tell me file not found because the path must be from your dropbox account
This particular one is different, what I working with is a zip file not .txt file so put method won't work.
$content = $filesystem->disk('local')->get('test.zip');
$filesystem->disk('dropbox')->put('test.zip', $content);
Ah ok got it. I guess it's not possible out of the box, because streaming is missing. You could try to to extend the FilesytemAdapther.php with writeStream() and writeStream() to recover the functionality described here Using streams for reads and writes.