FileStorage
The File Storage module simplifies your file upload and storage tasks. Use the 'Initiate Upload' module to start and complete file uploads. Once the upload is successful, employ the 'Complete Upload' module to retrieve the file's URL. For added security, utilize the 'Sign URLs' module, which grants authorized access through signed URLs.
File upload is a feature that enables users to upload files from their device to a designated storage location in the system. The process of uploading begins by validating user parameters and organizing files into different groups based on their type using something called a "namespace". This helps in storing the files into Public and Private buckets Private - The files stored in private bucket is accessible via getSignedUrl method for a temporary duration. Public - The files stored in public bucket is accessible via cdn url Customer initiate the upload process by selecting from pre-existing images, choosing from your device, uploading via URL, or entering an image URL. 1. Start Upload - Once seller calls start upload will receive a signed URL to initiate the upload process. 2. Utilize a Google Cloud Platform (GCP) method to upload the file through the obtained signed URL. 3. Complete File upload - Important file details such as name, size, content type, and namespace are collected and linked to maintain data integrity within the system's database. Once you upload a file, you receive a message with all the details about where your file is stored, including a secure URL for uploading files to the designated storage and a CDN (Content Delivery Network) URL for future accessibility. Furthermore, the system sets an expiration time for access links(signed Url) enhancing security measures.
The Signed URLs feature is responsible for generating signed URLs for multiple objects, enabling secure access to stored files. You can utilize this feature to create accessible links for the stored resources for a specified period. For example, if you need to download private files from Google Cloud Storage (GCS), this method can generate a secure link for a temporary duration. These links are signed with a cryptographic signature, ensuring secure access to the files within the specified time frame. By providing signed URLs, the Signed URLs feature enhances file access security, making file management more secure and efficient.