Closed Ansis100 closed 1 month ago
The header parameter filename in multipartUpload is properly encoded: https://github.com/781flyingdutchman/background_downloader/blob/0fd47563c0239c5dcf8e1e0d9cd425ff0433e9d8/lib/src/desktop/upload_isolate.dart#L134-L137
filename
multipartUpload
However, in binaryUpload it is not: https://github.com/781flyingdutchman/background_downloader/blob/0fd47563c0239c5dcf8e1e0d9cd425ff0433e9d8/lib/src/desktop/upload_isolate.dart#L52-L53
binaryUpload
Which leads to "Invalid HTTP header" errors when trying to upload files with non-latin characters.
I didn't notice that browserEncode does not actually perform encoding but only replaces some characters. I'm guessing we would need to use Uri.encodeComponent.
browserEncode
Uri.encodeComponent
Included in V8.5.6
The header parameter
filename
inmultipartUpload
is properly encoded: https://github.com/781flyingdutchman/background_downloader/blob/0fd47563c0239c5dcf8e1e0d9cd425ff0433e9d8/lib/src/desktop/upload_isolate.dart#L134-L137However, in
binaryUpload
it is not: https://github.com/781flyingdutchman/background_downloader/blob/0fd47563c0239c5dcf8e1e0d9cd425ff0433e9d8/lib/src/desktop/upload_isolate.dart#L52-L53Which leads to "Invalid HTTP header" errors when trying to upload files with non-latin characters.