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

Support Azure Blob Storage #10

Merged
merged 6 commits into from
Dec 12, 2023

Conversation

clementsirieix
Copy link
Collaborator

@clementsirieix clementsirieix commented Dec 6, 2023

Changes

Following Azure storage support, we need to update the file upload method.
Azure require a PUT request, so I'm returning a method field.
Similarly a specific header need to be passed so I'm providing custom headers, in a headers field.

How to test?

  • Make sure that the server is running on this branch
  • python examples/file-upload.py
  • Using the default environment variables should make the file accessible at http://localhost:4566/my-bucket
  • Using the azure env should work

@clementsirieix clementsirieix added the enhancement New feature or request label Dec 6, 2023
@clementsirieix clementsirieix self-assigned this Dec 6, 2023
Copy link

linear bot commented Dec 6, 2023

CHA-612 Attachments should be signed

Description

When fetching an Attachment I should override the url with a signed url based on objectKey.

Let's cache the read signedUrl to make sure to not duplicate stuff.

Definition of Done

  • Fetching an Attachment I should override the url property if the objectKey property exist
  • Ensure that it works when fetching from other relations (e.g. Step)

@clementsirieix clementsirieix force-pushed the clement/cha-612-attachments-should-be-signed branch from b629863 to 522647d Compare December 6, 2023 12:17
upload_response = await client.post(
upload_details["url"],
files=form_data,
client_request = client.put if method == "PUT" else client.post
Copy link

Choose a reason for hiding this comment

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

We could use client.request (https://www.python-httpx.org/api/#asyncclient) to avoid storing the function into a variable. Something like client.request(method, url...).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@clementsirieix clementsirieix force-pushed the clement/cha-612-attachments-should-be-signed branch 2 times, most recently from be8c9b7 to b7fac11 Compare December 6, 2023 17:01
@clementsirieix clementsirieix force-pushed the clement/cha-612-attachments-should-be-signed branch from b7fac11 to dc0d62e Compare December 12, 2023 13:17
@clementsirieix clementsirieix merged commit 1a05843 into main Dec 12, 2023
1 check failed
@clementsirieix clementsirieix deleted the clement/cha-612-attachments-should-be-signed branch December 12, 2023 14:32
@clementsirieix clementsirieix restored the clement/cha-612-attachments-should-be-signed branch December 12, 2023 14:35
@clementsirieix clementsirieix deleted the clement/cha-612-attachments-should-be-signed branch December 12, 2023 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants