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(storage): fill content-type based on file extension #400

Merged
merged 2 commits into from
May 27, 2024

Conversation

grdsdev
Copy link
Collaborator

@grdsdev grdsdev commented May 22, 2024

What kind of change does this PR introduce?

Feature

What is the current behavior?

Developer must specify the content-type manually

What is the new behavior?

Use UTType from Apple framework for getting the MIME type based on a file extension, ie .jpg -> image/jpeg.

Note: not all file extensions are supported, so it defaults to application/octet-stream

@grdsdev grdsdev requested a review from dshukertjr May 22, 2024 19:25
@grdsdev grdsdev merged commit 569f445 into main May 27, 2024
9 checks passed
@grdsdev grdsdev deleted the feat/storage/auto-content-type branch May 27, 2024 15:49
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