
cool, let me take a look with this

ty!

Can you try removing “%22” from your URL? I am saying this since removing it shows me the image else it does not

i tried that too, i have tried multiple images from different sources, even from own bucket, no cors problem, and the empty file error persists

could you send me a zip or tar.gz of the function files?

I am unsure what to send, and I am not trying to use a cloud function, I am basically trying to use this the storage createFile() method with bytes for InputFile as required for web.

I've just noticed, your trying to readBytes a url but shouldn't you be making a network request there?

then taking the body and moving it into a buffer?

Future<Uint8List> readBytes(Uri url, {Map<String, String>? headers}) Type: Future<Uint8List> Function(Uri, {Map<String, String>? headers})
package:http/http.dart
Sends an HTTP GET request with the given headers to the given URL and returns a Future that completes to the body of the response as a list of bytes.

And I do get bytes back.

Hm, I see

allow me to find a colleague who might have more familiarity with flutter

I personally haven't used it alot

TY! I do not, however, think it's a problem with flutter. But that might be so.

Do you receive a response from the request?

I do, from readBytes()

what about the appwrite function?

Do you get a response from that?

I get Empty file passed to the endpoint. (400)

@Bender I found the problem, we should have a better documentation, because you are providing the bytes, you also need to provide filename
parameter otherwise the file will not be received. please include filename
parameter in the InputFile
along with bytes and it should work

now it works, but i did provide the name at some point. baffled, but great it works.

TY!

TY for running into this error, now we can fix in the SDK with some assertions 😄

Please mark it as solved by editing the title [SOLVED] ...

[SOLVED] Empty file passed to the endpoint. (400)
Recommended threads
- "Memberships privacy" setting in 1.7.4
Hi everyone, I'm experiencing an issue with a clean self-hosted installation of Appwrite version 1.7.4. I previously used version 1.6.1, and if I remember corre...
- Function 404 error - Deployment with the...
I have a function in my Appwrite Cloud (free plan) project that cannot be accessed or deleted (404 in both UI and CLI). I'm stuck at the 5 functions limit and c...
- 1.6 to 1.7 does not work
Appwrite (self-hosted) stopped working after updating from 1.6.2 that was stable. Getting the general_server_error. Mentioning I fallowed all steps for upgrad...
