fl4p / dropphp Goto Github PK
View Code? Open in Web Editor NEWDropPHP is a simple PHP class for Dropbox API
License: MIT License
DropPHP is a simple PHP class for Dropbox API
License: MIT License
Hey,
I'm receiving the following PHP warning on all pages that load DropboxClient.php
PHP Deprecated: locale is deprecated with Dropbox v2 API. in /home/ubuntu/workspace/includes/DropboxClient.php on line 50
Thanks in advance.
Matt
Hi mate
I see you've added a link expiry get but is there a way to do a link expiry set?
I would like to upload the file and set the link expiry date to eg 1Y. Thanks
please solve this
Is it possible to implement chunked up loading for files over 300MBs?
Hi, i was using the sample.php 2 weeks ago and everything worked fine, now every time i try to download a file it displays 'Download size Mismatch' in the error_log
thanks for you time
I want to change the license to MIT
I am using GetLink() for image preview but its not working so want to use createShareableUrl() method of Dropbox is that possible or not if not then what method we use for that please suggest me.
Hey everyone,
I've set up DropPHP and it works fine. But there's one thing I cannot manage.
I want to arrange my files in different folders within my app folder. Creating folders by the CreateFolder function works fine but when I try to upload a file into that folder by prepending a /my-folder-name/ to the $db_path when calling the UploadFile function it replaces the the folder with a new .txt file called after the folder name.
So if before there was the folder my-folder-name/ there is now the file my-folder-name.txt on the root of the app folder in Dropbox.
Is there anything I'm doing wrong? Does the UploadFile (if it works properly) automatically create Folders if they don't exist?
Tank you
Hai friend,
It's working good. And i need a small help from you.
-> I am able get photos of the user from his / her Dropbox using your api.
-> I want to get thumbnails from the user drop box. How can i get those thumbnails.
Can you please send me the solution to my mail.
My Email id: [email protected]
Regards,
Madhu.
UploadFile send server files to dropbox. Is it possible to send client files, too?
i get error
Parse error: syntax error, unexpected '*', expecting ',' or ';', on this line "const UPLOAD_CHUNK_SIZE = 2 * 1024 * 1024;"
i think because not use quote, and iniate i give quote like this :
const UPLOAD_CHUNK_SIZE = "2 * 1024 * 1024";
andd... i get this Notice: A non well formed numeric value encountered in
when i upload file index.php with 1 byte is success, but when i upload avatar.jpg 7,9 KB is failed and long time process
how to fix it? sorry i am beginner in php native
please great plugin but i cannot upload Zip file
Error
Uploading dropbox-sdk-php-1.1.5.zip:
Fatal error: Uncaught exception 'DropboxException' with message 'App is not allowed to access the path '/dropbox-sdk-php-1.1.5.zip'.' in /Applications/MAMP/htdocs/Dropx/DropboxClient.php:597
Stack trace:
#0 /Applications/MAMP/htdocs/Dropx/DropboxClient.php(337): DropboxClient::checkForError(Object(stdClass))
#1 /Applications/MAMP/htdocs/Dropx/sample-form.php(32): DropboxClient->UploadFile('/Applications/M...', 'dropbox-sdk-php...')
#2 {main}
thrown in /Applications/MAMP/htdocs/Dropx/DropboxClient.php on line 597
If there are more files in user Drop box the execution time is more than one minute and I am getting 504 error.
Please let me know the solution.
Thanks friend.
Madhu
I get the following php Warning:
PHP Warning: Undefined property: stdClass::$.tag in DropboxClient.php on line 326
I use the Version 2.0.0 from Oct. 17, 2017.
some points to get it working
/upload_session/start must be called with content type set, can upload first chunk
/upload_session/append_v2 return nothing, check for returned json call the exception
/upload_session/finish must be called with offset = whole_file_size, content type header filled must be too
altered source attached
DropboxClient.php.txt
Is this possible to overwrite a text file when uploading using this php code? If so how?
function cleanUrl() is without defined access type (public, protected, ...)
I found next many functions with same issue.
When listing files in a folder which is over a certain size (in terms of number of items), the call fails with the following error:
Error in call to API function "files/list_folder/continue": request body: unknown field 'path' (URL was https://api.dropboxapi.com/2/files/list_folder/continue)
This is due to an incorrect call to the continue URL in function apiCall
. The call is done with all paramaters, but the correct call would be only with the parameter cursor
. See documentation of the API call. I'm not sure if the server side got more picky or if noone ever tested with larger folders, but the code is in since 83eb3cf.
Interestingly the continuation is correctly handled in the function GetFiles
, where the API is called only with the cursor
parameter. I commented out the incorrect call (lines 793-801) and I was able to run the GetFiles
command successfully.
I received an email from Dropbox that API v1 will be turned off on june 28 2017
Will this has any effect on DropPHP library?
Thank you
Implement Webhooks
Does this library support /media
for core api? How do I get direct link of any file?
Hi,
Just downloaded the latest version (EDIT: 2.0.0). It threw PHP errors regarding lines 20, 21, 847 and 848.
These lines all include a calculation in the format "150 * 1024 * 1024".
I replaced those calculations with integers equal to the result of the calc and it now works.
In sample.php - "Call to undefined method DropboxClient::SetAccessToken()"
Hello, I just wanted to say thank you for v2. My only comment is I which you made it a drop in replacement to V1
So I added
public function SetAccessToken ($token)
{
$this->SetBearerToken($token);
}
and commented
// if ( count( func_get_args() ) > 1 ) {
// trigger_error( "locale is deprecated with Dropbox v2 API.", E_USER_DEPRECATED );
// }
I am currently getting the Could not request token error. Is there anyway to manually set the token?
Hi,
First of all, thanks for making DropPHP!
I'm using the v2 branch, and have it (almost) working.
When trying:
$dropbox->CreateFolder('newFolder');
I get this error:
Fatal error: Uncaught exception 'DropboxException' with message 'apiCall(2/files/create_folder_v2) failed: Error in call to API function "files/create_folder_v2": request body: unknown field 'root' (URL was https://api.dropboxapi.com/2/files/create_folder_v2)' in /home/ubuntu/workspace/dropphp/DropboxClient.php on line 624 DropboxException: apiCall(2/files/create_folder_v2) failed: Error in call to API function "files/create_folder_v2": request body: unknown field 'root' (URL was https://api.dropboxapi.com/2/files/create_folder_v2) in /home/ubuntu/workspace/dropphp/DropboxClient.php on line 624 Call Stack: 0.0007 239280 1. {main}() /home/ubuntu/workspace/dropphp/dropbox-createCasefileFolder.php:0 0.0032 269416 2. DropboxClient->CreateFolder() /home/ubuntu/workspace/dropphp/dropbox-createCasefileFolder.php:23 0.0032 270056 3. DropboxClient->apiCall() /home/ubuntu/workspace/dropphp/DropboxClient.php:484 0.0032 270328 4. DropboxClient->doSingleCall() /home/ubuntu/workspace/dropphp/DropboxClient.php:658
In DropboxClient.php line 484 I changed this:
array('root' => $this->rootPath, 'path' => $path));
to this:
array('path' => $path));
...and it now works.
Was this a fluke, or is it the actual solution?
Thanks in advance.
Hi
Thanks for your great script!
When do you plan updating the functions for API v2? I need some functions, which do not yet work in your v2 script.
Otherwise I have to look for another class :(
I see there hasn't been any updates in a while, so I'm not sure if anyone is still using this. Dropbox no longer supports long-lived tokens and now requires sending refresh tokens to maintain connection. Is there any way to update the library to support this?
I get this error:
500 Internal Server Error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.