Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-signed URL upload for better security #251

Merged

Conversation

amjedidiah
Copy link
Collaborator

No description provided.

BREAKING CHANGE: Replaced direct cloud storage configuration with pre-signed URLs

- Added pre-signed URL endpoint configuration
- Removed cloud storage credentials from frontend
- Deleted cloud storage config files
- Updated upload logic to use pre-signed URLs
- Simplified configuration interface
- Added CORS mode to uploadObject fetch request
- Prettier fixes

BREAKING CHANGE: Requires S3 bucket CORS configuration
- Added client-side SDK approach for cloud storage providers
- Implemented AWS integration with presigned URLs
- Added credential refresh and SAS token management
- Implemented progress tracking and retry mechanisms
- Fixed type errors and improve error handling
- Removed unused code and align with latest SDK versions

BREAKING CHANGE: Storage configuration requires provider-specific SDK setup
- Added client-side SDK approach for Azure provider
- Implemented Azure integration with presigned URLs
- Implemented progress tracking
- Removed unused code and align with latest SDK versions
- Storage config only requires `provider` and `tokenEndpoint` values
- Added client-side SDK approach for DO provider
- Implemented DO integration with presigned URLs
- Unified s3 client-side upload approach for S3 complaint storage providers
- preview url for uploaded files
@amjedidiah amjedidiah changed the title [WIP] pre-signed URL with auth token appraoch [WIP] pre-signed URL upload for better security Nov 21, 2024
- made ETag header conditional
- removed `previewUrl` from object returned to FE
@amjedidiah amjedidiah force-pushed the feat/cloud-storage-sdk-integration branch from e5e1332 to edfe2ea Compare November 21, 2024 15:37
@amjedidiah amjedidiah changed the title [WIP] pre-signed URL upload for better security pre-signed URL upload for better security Nov 21, 2024
Copy link
Collaborator

@BSalaeddin BSalaeddin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable Naming Improvements suggestions

  1. files: Rename to uploadedFiles or selectedFiles in components and hooks that expose it to developers. This will make its purpose clearer when returned by hooks or used as props in components (e.g., in UpupUploader.tsx).

  2. onChange: Rename to onFileSelectionChange for props exposed by components to better describe its role in handling file selection updates.

  3. toBeCompressed: Rename to shouldCompress for component props to better reflect its boolean nature and improve clarity for developers configuring the component.

  4. keys: Rename to uploadedFileKeys if returned by hooks or methods, to clarify that it represents the identifiers of successfully uploaded files.

Renames
- `files` to `selectedFiles`
- `onChange` to `onFilesSelected`
- `onFilesChange` to `onPrepareFiles`
- `toBeCompressed` to `shouldCompress`
- `keys` to `uploadedFileKeys`
@MedAmine1212 MedAmine1212 self-requested a review November 26, 2024 19:50
Copy link
Collaborator

@MedAmine1212 MedAmine1212 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@amjedidiah amjedidiah merged commit 6673ed3 into DevinoSolutions:master Nov 28, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants