-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add thumbnail upload #55
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is ok for test deployment but to connect to MCP we'll need an a new role that can assume AWS Security Token Service (STS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This addresses #4
This adds a Thumbnail Uploader component that can be accessed by a page on the
/upload
route or via a drawer opened by a button on the ingest forms. To enable this PR to be merged, the new feature and playwright test is hidden behind a flag with the env variableNEXT_PUBLIC_ENABLE_THUMBNAIL_UPLOAD
which can be uploaded later.Uploading is accomplished by making an api call to the
/api/upload-url
route. A check is made to see if the filename matches any existing objects. A signed URL is returned along with the boolean indicating if that file exists. The frontend can then make a direct upload to aws with that signed url.NEXT_PUBLIC_AWS_S3_BUCKET_NAME
/api/upload-url
route used to request a signed URL is locked to authenticated users via the middlewareI also cleaned up the ObjectFieldTemplate file that inserts the buttons onto the ingest forms. Now the "Generate Renders Object" button is just under the Renders input field, and the file structure is simplified.
Environmental Variables
Environment Variables added for authenticating with AWS:
Bucket Policy
The policy on the test bucket to allow this feature to work:
AWS Role
An IAM role named
veda-ingest-ui-s3-uploader
was created with the following permissions to allow the application to assume the role and read and write to the bucket:Screenshots
Button on Ingest Form

Succesfull Upload View

Error handling
