You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let upload_max: u32 = 10;
let options = MultipartFormDataOptions::with_multipart_form_data_fields(
vec! [
MultipartFormDataField::file("URL").
repetition(Repetition::fixed(upload_max))
.content_type_by_string(Some(mime::IMAGE_STAR)).unwrap(),
MultipartFormDataField::text("body"),
]
);
Works:
let upload_max: u32 = 3;
let options = MultipartFormDataOptions::with_multipart_form_data_fields(
vec! [
MultipartFormDataField::file("URL").
repetition(Repetition::fixed(upload_max))
.content_type_by_string(Some(mime::IMAGE_STAR)).unwrap(),
MultipartFormDataField::text("body"),
]
);
If I set the upload max to 3 the code works as expected and will upload the 3 files and finish the routine. If I go to 10 (my desired upload limit) it throws an error stating "The data type of field url is incorrect.".
I looked through the source code a bit to see how the fixed() function works and I don't see anything inherently wrong with it. I also could be using this wrong, but it seems the max for the code was set higher than 10 as well. Any help would be appreciated!
The text was updated successfully, but these errors were encountered:
Bug Reports
rocket = "0.4.10"
Windows 10 2004
The bug seems to be in the following code
Broken:
Works:
If I set the upload max to 3 the code works as expected and will upload the 3 files and finish the routine. If I go to 10 (my desired upload limit) it throws an error stating "The data type of field
url
is incorrect.".I looked through the source code a bit to see how the fixed() function works and I don't see anything inherently wrong with it. I also could be using this wrong, but it seems the max for the code was set higher than 10 as well. Any help would be appreciated!
The text was updated successfully, but these errors were encountered: