kunalvarma05 / dropbox-php-sdk

🔥📦 An Easy-to-Use PHP SDK to work with the Dropbox V2 API.
https://kunalvarma05.github.io/dropbox-php-sdk/
MIT License
363 stars 180 forks source link

Large File chunk upload 400 Bad Request #167

Open apurbajnu opened 4 years ago

apurbajnu commented 4 years ago

[26-Apr-2020 15:07:30 UTC] PHP Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: POST https://content.dropboxapi.com/2/files/upload_session/append_v2 resulted in a 400 Bad Request response: Error in call to API function "files/upload_session/append:2": HTTP header "Dropbox-API-Arg": cursor.offset: expected in (truncated...) in /Users/apurbapodder/public_folder/wp-cloner/wp-content/plugins/wp-smart-cloner/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace:

0 /Users/apurbapodder/public_folder/wp-cloner/wp-content/plugins/wp-smart-cloner/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))

1 /Users/apurbapodder/public_folder/wp-cloner/wp-content/plugins/wp-smart-cloner/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp{closure}(Object(GuzzleHttp\Psr7\Response))

2 /Users/apurbapodder/public_folder/wp-cloner/wp-content/plugins/wp-smart-cloner/vendor/guzzlehttp/p in /Users/apurbapodder/public_folder/wp-cloner/wp-content/plugins/wp-smart-cloner/vendor/kunalvarma05/dropbox-php-sdk/src/Dropbox/Http/Clients/DropboxGuzzleHttpClient.php on line 62

apurbajnu commented 4 years ago

It works fine If I dont pass chunksize and filesize.