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

feat: filemanager presigned route #475

Merged
merged 8 commits into from
Aug 15, 2024
Merged

Conversation

mmalenic
Copy link
Member

Closes #459

Changes

  • Adds routes under /s3/presign and /s3/presign/{:id} to fetch presigned URLs for current objects only.
  • responseContentDisposition can be used to set the content-disposition of the presigned GetObject request. The default value is inline, as this matches the HTTP content-disposition header.

@mmalenic mmalenic self-assigned this Aug 15, 2024
@mmalenic mmalenic added filemanager an issue relating to the filemanager feature New feature labels Aug 15, 2024
Copy link
Member

@victorskl victorskl left a comment

Choose a reason for hiding this comment

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

LGTM

@mmalenic
Copy link
Member Author

Update

  • Fixed a bug with parsing the HOST header, which was introduced with refactor(filemanager): API style #472. Thanks @williamputraintan.

    • I assumed that HOST was a valid URL, but it's actually just the host:port without the scheme.
  • I've added a FILEMANAGER_API_TLS_LINKS option which controls whether links are returned as http or https.

    • Should this be more automatically derived? E.g. default http for filemanager-api-server, and default https for filemanager-api-lambda?

@williamputraintan
Copy link
Member

williamputraintan commented Aug 15, 2024

While this is not merged, possible to add an env-var in the compose for the filemanager service? So the local API server could have some presigned URL instead of an unhandled error?

      - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-random_access_key_id}
      - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-random_secret_access_key}
      - AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION:-ap-southeast-2}

…ing TLS, and add AWS credentials to docker
@mmalenic mmalenic merged commit 7e2c1d5 into main Aug 15, 2024
5 checks passed
@mmalenic mmalenic deleted the feat/filemanager-presigned-route branch August 15, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature filemanager an issue relating to the filemanager
Projects
None yet
Development

Successfully merging this pull request may close these issues.

filemanager: add presigned URL route
4 participants