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

Working on download function with the file name #196

Merged
merged 23 commits into from
Jul 18, 2024
Merged

Conversation

chihlinc
Copy link
Collaborator

@chihlinc chihlinc commented Jul 7, 2024

No description provided.

Copy link
Collaborator

@devhawk devhawk left a comment

Choose a reason for hiding this comment

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

Looks good! Works as expected. Going to hold of on merging until 2024-07-08 meeting since it requires updating the backend which is not automated (yet!)

const blob = await response.blob();

// Fetch the attachment name
const nameResponse = await fetch(`${baseUrl}/attachment/${deviceKey}/${attachmentID}/name`, {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we check the response headers for attachment-name before calling into the attachment/${deviceKey}/${attachmentID}/name function? If deploying to the cloud resolves the CORS issue, we can avoid making two round trips every time.

@devhawk
Copy link
Collaborator

devhawk commented Jul 9, 2024

Discussed this PR in today's meeting. Will merge after @chihlinc gets a chance to address my comment above and I have time to manually update the back end after merging

@devhawk devhawk merged commit 1e77c7b into main Jul 18, 2024
2 checks passed
@devhawk devhawk deleted the coco-harry-attachment branch July 18, 2024 20:48
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.

2 participants