murar8 / axum_typed_multipart

Type safe multipart/form-data handling for axum.
84 stars 14 forks source link

Error with Vec<u8> #88

Closed Cheban1996 closed 1 week ago

Cheban1996 commented 2 weeks ago

I got error if type of field is Vec<u8>

field 'bin' must be of type 'alloc::string::String': invalid utf-8 sequence of 1 bytes from index 0

murar8 commented 1 week ago

Hi @Cheban1996, can you provide some more context? Does it happen with a specific input? The u8 is parsed from its string representation in valid utf-8.

Cheban1996 commented 1 week ago

Hi @Cheban1996, can you provide some more context? Does it happen with a specific input? The u8 is parsed from its string representation in valid utf-8.

No, isn't utf-8 It's was just a binary file

murar8 commented 1 week ago

Maybe https://docs.rs/axum_typed_multipart/latest/axum_typed_multipart/#large-uploads is what you want?

Cheban1996 commented 1 week ago

Maybe https://docs.rs/axum_typed_multipart/latest/axum_typed_multipart/#large-uploads is what you want?

Is not my way (( Required to load in memory But i resolve this truble via Bytes :D