pub struct save_files;
Expand description
Saves files locally by breaking them into chunks.
§Arguments
request
- A reference to the Actix webHttpRequest
object.payload
- Mutable multipart struct that is sent from the UI asFormData
.fernet
- Fernet object to encrypt the auth payload that will be set assession_token
cookie.session
- Session struct that holds thesession_mapping
andsession_tracker
to handle sessions.config
- Configuration data for the application.
§See Also
- The JavaScript in the frontend appends a reference/pointer to the file.
- Once the reference is loaded, it makes an asynchronous call to the server.
- The server then breaks the file into chunks and downloads it iteratively.
- The number of files that can be uploaded simultaneously depends on the number of workers configured.
§References
§Returns
200
- Plain HTTPResponse indicating that the file was uploaded.422
- HTTPResponse with JSON object indicating that the payload was incomplete.400
- HTTPResponse with JSON object indicating that the payload was invalid.
Trait Implementations§
Source§impl HttpServiceFactory for save_files
impl HttpServiceFactory for save_files
fn register(self, __config: &mut AppService)
Auto Trait Implementations§
impl Freeze for save_files
impl RefUnwindSafe for save_files
impl Send for save_files
impl Sync for save_files
impl Unpin for save_files
impl UnwindSafe for save_files
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more