pub struct Upload;Expand description
Upload an image.
§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 = falsestatus at documentuploads/media/global/{id} - Image is processed and uploaded to the final bucket
- Firestore is notified of
processing = true, ready = truestatus at documentuploads/media/global/{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:
400 - BadRequestif the request is invalid.401 - Unauthorizedif authorization is not valid. This may be an API server issue, see #1209.403 - Forbiddenif the user does not have sufficient permission to perform the action.501 - NotImplementedwhen the s3/gcs service is disabled.
Trait Implementations§
Source§impl ApiEndpoint for Upload
impl ApiEndpoint for Upload
Source§type Req = ImageUploadRequest
type Req = ImageUploadRequest
The request type for this endpoint.
Source§type Res = ImageUploadResponse
type Res = ImageUploadResponse
The response type for this endpoint.
Source§type Path = ImageUploadPath
type Path = ImageUploadPath
The path 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