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

Content-Type header not set for DEA uploaded media #829

Open
2 tasks
1t5j0y opened this issue Dec 12, 2024 · 0 comments
Open
2 tasks

Content-Type header not set for DEA uploaded media #829

1t5j0y opened this issue Dec 12, 2024 · 0 comments
Assignees

Comments

@1t5j0y
Copy link
Contributor

1t5j0y commented Dec 12, 2024

https://avni.freshdesk.com/a/tickets/5013

Describe the bug
On clicking of an image link in any integrating app that has a link to /web/media?url=<s3 url>, the image should be displayed in browser and not downloaded. Currently for images uploaded via DEA, the images are downloaded on click instead of rendered in browser.

Root cause
'Content-Type' header is not set for images uploaded from DEA using server API /web/uploadMedia and as a result the default content type application/octet-stream is set on the file leading to this behaviour.

For reference, for images uploaded from android, we are fixing the extension and setting Content-Type.

To Reproduce
Steps to reproduce the behavior:

  1. Upload a jpeg image from DEA
  2. Access the image using /web/media?url=<s3 url> url
  3. Notice that download popup is shown and image is not rendered in the browser.

Expected behavior

  1. Image should be displayed in the browser and not downloaded.
  2. Add 'jpeg' as a valid image extension on media-viewer app.

Screenshots
Video in ticket.

Additional context
Add any other context about the problem here.

Developer Checklist
Developer fixing the bug should fill this checklist.

  • Does the fix require extensive regression testing?
  • Are you mentioning the required scenarios that could be affected?
@1t5j0y 1t5j0y moved this to New Issues in Avni Product Dec 12, 2024
@1t5j0y 1t5j0y changed the title Content-Type header not set for DEA uploaded JPEG images Content-Type header not set for DEA uploaded images Dec 12, 2024
@1t5j0y 1t5j0y changed the title Content-Type header not set for DEA uploaded images Content-Type header not set for DEA uploaded media Dec 12, 2024
@mahalakshme mahalakshme moved this from New Issues to Ready in Avni Product Dec 16, 2024
@1t5j0y 1t5j0y moved this from Ready to In Progress in Avni Product Dec 17, 2024
@1t5j0y 1t5j0y self-assigned this Dec 17, 2024
1t5j0y added a commit to avniproject/avni-media that referenced this issue Dec 18, 2024
@1t5j0y 1t5j0y moved this from In Progress to Code Review Ready in Avni Product Dec 18, 2024
@petmongrels petmongrels moved this from Code Review Ready to In Code Review in Avni Product Dec 20, 2024
@petmongrels petmongrels moved this from In Code Review to QA Ready in Avni Product Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: QA Ready
Development

No branches or pull requests

1 participant