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

Add MIME type field to artifact struct #408

Open
wants to merge 3 commits into
base: graph-proxy-artifact-access
Choose a base branch
from

Conversation

yousefmoazzam
Copy link
Collaborator

This uses mime_guess to do a dumb guess of the MIME type based purely on the file extension.

infer has more stars on github, but I think it's being smarter and reading the file/bytes to determine the MIME type.

I didn't know if we wanted to bother to check the file data, so I chose the simpler option - feel free to suggest otherwise.

@garryod
Copy link
Member

garryod commented Jan 31, 2025

I didn't know if we wanted to bother to check the file data, so I chose the simpler option - feel free to suggest otherwise.

I think this is the right call, otherwise we'd need to download the object to our service just to provide this field

@yousefmoazzam yousefmoazzam force-pushed the graph-proxy-artifact-access branch from 1977352 to a52c7ea Compare January 31, 2025 15:46
@garryod garryod added enhancement New feature or request rust Pull request that updates Rust code labels Jan 31, 2025
@garryod garryod self-requested a review January 31, 2025 16:12
@yousefmoazzam yousefmoazzam force-pushed the graph-proxy-artifact-access branch 3 times, most recently from dbbaebe to db95515 Compare January 31, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rust Pull request that updates Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants