-
Notifications
You must be signed in to change notification settings - Fork 33
[_] fix(thumbnails): use workspace bucket for workspace uploads #1838
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
base: master
Are you sure you want to change the base?
Conversation
Deploying drive-web with
|
| Latest commit: |
9a1962a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f896954f.drive-web.pages.dev |
| Branch Preview URL: | https://fix-thumbnail-workspace-cred.drive-web.pages.dev |
| }, | ||
| { | ||
| isTeam: false, | ||
| isTeam: !!this.options?.ownerUserAuthenticationData?.workspaceId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this flag the workspace correct flag or a deprecated flag of the previous deprecated version? Provide a GitHub ref demonstrating so pls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…kward compatibility for downloads
CandelR
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@douglas-xt Remember to fill the testing process :). Good job 🚀
|



Description
When users upload files from desktop clients to their workspaces, both the file and thumbnail are sent to the correct workspace bucket using the appropriate context. However, the web application always uses the personal storage context when downloading thumbnails, regardless of where they were actually stored. This causes thumbnails from workspace uploads to fail to display. The issue only appears with desktop uploads because when uploading directly from web, it uses the same incorrect personal context for both upload and download, so they accidentally match and work.
The file upload flow was corrected by adjusting how we determine whether a file belongs to a workspace or personal storage. Instead of using a hardcoded value, the upload context is now evaluated dynamically to retrieve the appropriate credentials from the environment. This ensures that when uploading a file to a workspace, both the file and its thumbnail are stored in the same workspace storage location, guaranteeing that files and their thumbnails always reside together in the correct storage space.
Additionally, backward compatibility was implemented for existing thumbnails that were previously stored in the wrong location. When downloading a thumbnail, the actual storage location is verified and the appropriate credentials are used to retrieve it. This means users with older thumbnails that were incorrectly stored in personal buckets can still view them seamlessly, while all new uploads follow the corrected behavior. This approach ensures a smooth transition without requiring migration of existing thumbnails or disrupting the user experience.
Related Issues
Related Pull Requests
Checklist
Testing Process
Additional Notes