Coder Social home page Coder Social logo

dropphp's People

Contributors

bilke avatar fl4p avatar micha137 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dropphp's Issues

License

I want to change the license to MIT

Uploading to Folders

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

Download size Mismatch

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

Issue with MAX_UPLOAD_CHUNK_SIZE = 150 * 1024 * 1024;

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.

How to set access token

I am currently getting the Could not request token error. Is there anyway to manually set the token?

Cannot list files in larger folders

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.

API v1 will be turned off.

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

Update for refresh tokens?

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?

Error Constanta

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

getthumbnail

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.

Method access modifiers

function cleanUrl() is without defined access type (public, protected, ...)
I found next many functions with same issue.

How to create upload media shareble url.

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.

GetFiles

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

Unable to Upload Zip File

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

$dropbox->CreateFolder doesn't work without this edit to DropboxClient.php

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.

Update Script for API v2?

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 :(

chunked upload not working in current

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

PHP warning - Deprecated: locale - line 50

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

Enhancement

Is it possible to implement chunked up loading for files over 300MBs?

Thank you for v2

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 );
// }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.