pub struct Upload;
Expand description
Upload an image to the user image library.
§Flow:
- User requests an upload session URI directly to Google Cloud Storage a. User uploads to processing bucket
- Firestore is notified of
processing = true, ready = false
status at documentuploads/media/user/{id}
- Animation is processed and uploaded to the final bucket
- Firestore is notified of
processing = true, ready = true
status at documentuploads/media/user/{id}
§Notes:
- Can be used to update the raw data associated with the image.
- If the client wants to re-upload an image after it has been successfully processed, it must repeat the entire flow instead of uploading to the same session URI.
§Errors:
401 - Unauthorized
if authorization is not valid.403 - Forbidden
if the user does not have sufficient permission to perform the action.501 - NotImplemented
when the s3/gcs service is disabled.
Trait Implementations§
Source§impl ApiEndpoint for Upload
impl ApiEndpoint for Upload
Source§type Path = UserImageUploadPath
type Path = UserImageUploadPath
The path type for this endpoint.
Source§type Req = UserImageUploadRequest
type Req = UserImageUploadRequest
The request type for this endpoint.
Source§type Res = UserImageUploadResponse
type Res = UserImageUploadResponse
The response type for this endpoint.
Source§type Err = EmptyError
type Err = EmptyError
The (inner) error type for this endpoint.
Auto Trait Implementations§
impl Freeze for Upload
impl RefUnwindSafe for Upload
impl Send for Upload
impl Sync for Upload
impl Unpin for Upload
impl UnwindSafe for Upload
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