Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue uploading files larger than 5 megabytes #10

Open
lasselehtinen opened this issue Jun 4, 2024 · 0 comments
Open

Issue uploading files larger than 5 megabytes #10

lasselehtinen opened this issue Jun 4, 2024 · 0 comments

Comments

@lasselehtinen
Copy link

Hi,

I was testing the SDK and noticed an issue when trying to upload larger files. Seems like the limit seems to be 5 megabytes. The error comes from the line below. I tried to debug this bug could not figure it out. Seems like it is splitting the file to chunks/parts and this might have something to do with it. I also could not find any mention about this limit in the documentation.

https://github.com/Files-com/files-sdk-php/blob/master/lib/Api.php#L52

Works:

head -c 5M </dev/urandom > /tmp/test5mb.zip
> File::uploadFile('/test.zip', '/tmp/test5mb.zip');
true

Does not work:

head -c 6M </dev/urandom > /tmp/test6mb.zip
> File::uploadFile('/test.zip', '/tmp/test6mb.zip');
TypeError  preg_match(): Argument #2 ($subject) must be of type string, null given.
vendor/files.com/files-php-sdk/lib/Api.php:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant