Skip to main content

save_uploads

Function save_uploads 

Source
pub async fn save_uploads(
    mp: Multipart,
    cfg: &UploadConfig,
    storage: &BoxedStorage,
) -> Result<Vec<SavedUpload>, UploadError>
Expand description

Drain mp, save every file field to storage, and return one SavedUpload per file. Skips non-file fields (those without a filename). Errors short-circuit — anything saved before the error is left in storage (callers can clean up if they care).

§Errors

See UploadError.