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
Hi, would be possible to access headers for poem::web::Field?
Due to limited resources on the device, when handling large file uploads, we need to write the multipart file stream to disk rather than loading it entirely into RAM. Ideally, we would like to make this decision based on the Content-Length header to determine whether the file can be temporarily stored in RAM or should be written directly to disk. However, since headers are private, we are unable to access the Content-Length directly.
Thank you
Code example (if possible)
asyncfnparse_from_multipart(field:Option<poem::web::Field>) -> ParseResult<Self>{match field {Some(field) => {let content_length = field.headers().get("Content-Length");// or field.get_header(header::CONTENT_LENGTH)// ... rest of code ...}
_ => {// Handle None case if necessary}}}
The text was updated successfully, but these errors were encountered:
Description of the feature
Hi, would be possible to access headers for poem::web::Field?
Due to limited resources on the device, when handling large file uploads, we need to write the multipart file stream to disk rather than loading it entirely into RAM. Ideally, we would like to make this decision based on the Content-Length header to determine whether the file can be temporarily stored in RAM or should be written directly to disk. However, since headers are private, we are unable to access the Content-Length directly.
Thank you
Code example (if possible)
The text was updated successfully, but these errors were encountered: