nao-pon / flysystem-google-drive

Flysystem adapter for Google Drive
MIT License
352 stars 128 forks source link

The number of bytes uploaded is required to be equal or greater than 262144, except for the final request (it's recommended to be the exact multiple of 262144). The received request contained 8192 bytes, which does not meet this requirement.. #15

Closed semsphy closed 7 years ago

semsphy commented 7 years ago

I'm using your package in laravel-backup, it uses writeStream method to upload a zip file to Google drive. And the file size is 4MB.

After run a backup command I got error messages:

The number of bytes uploaded is required to be equal or greater than 262144, except for the final request (it's recommended to be the exact multiple of 262144).  The received request contained 8192 bytes, which does not meet this requirement..

But if I upload file with this snippet, it is ok.

\Storage::disk('google')->put('2017-06-02-20-23-34.zip', file_get_contents('../2017-06-02-20-23-34.zip'));

Are there any solutions?

greatsami commented 7 years ago

Did you find a solution ???

vitorfavila commented 7 years ago

Same problem here!

nao-pon commented 7 years ago

@semsphy , @greatsami , @vitorfavila What is result of ini_get('memory_limit') on PHP?

nao-pon commented 7 years ago

There was a problem when PHP memory_limit was -1, so I fixed it. Thanks!

vitorfavila commented 7 years ago

@nao-pon Thank you!!!

semsphy commented 7 years ago

Thanks