-
Notifications
You must be signed in to change notification settings - Fork 11
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
Large payload with keep alive (default) causes errors #6
Comments
This probably related to CORS, try this: https://stackoverflow.com/questions/49343024/getting-typeerror-failed-to-fetch-when-the-request-hasnt-actually-failed |
@Zekfad I don't think is CORS related because with smaller files it seems to work fine. Below is a minimal setup using
A test with |
This took me some time to figure out, but it seems that fetch with To prevent fetch from setting final req = http.MultipartRequest('POST', url)
..files.add(file)
..persistentConnection = false; Regarding " |
Thank you for looking at the issue. That's certainly strange because it is working fine when using directly the browsers @shurentuya Before updating it in the PocketBase Dart SDK, I'll have to experiment whether the disabled |
Looking at your module, I suggest adding check for size and Keep-alive allows you to reuse connection for further requests, but it looks like it has it's own limitations, here are spec: https://fetch.spec.whatwg.org/#http-network-or-cache-fetch see 4.5. list: 8.10.5:
|
Yeah, I've check it, it seems Chrome have some mechanism for that (my assumption - flag is implicitly |
Hm, this seems aligned with the spec https://fetch.spec.whatwg.org/#http-network-or-cache-fetch:
But I'm still not sure why it is working fine with the plain js edit: It seems that we posted almost at the same time. I'll experiment with disabling the flag. |
Set I've also checked that you have limitation regarding request cancel, this can be done via fetch, if you don't mind depending on it. |
@shurentuya Just to let you know that I've pushed a fix in PocketBase SDK v0.10.3 and the Anyway, thank you @Zekfad for debugging the issue! |
I'm using pocketbase realtime for web using this client as the developer mentioned here
But when I try to upload file with MultipartFile from http
It seems to break only when uploading files that are bigger than 1mb and gives me this error
The text was updated successfully, but these errors were encountered: