Skip to content

FileExtensionContentTypeProvider #1425

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

Closed
Bartmax opened this issue May 5, 2016 · 9 comments
Closed

FileExtensionContentTypeProvider #1425

Bartmax opened this issue May 5, 2016 · 9 comments

Comments

@Bartmax
Copy link

Bartmax commented May 5, 2016

It feels weird that the FileExtensionContentTypeProvider is on the StaticFiles middleware.

Shouldn't be somewhere more accesible ?
I think there are multiple situations where one may want to work with that provider outside of static files.

Just a thought.

@Tratcher
Copy link
Member

Tratcher commented May 6, 2016

What examples did you have in mind?

@Bartmax
Copy link
Author

Bartmax commented May 7, 2016

File uploads and detect content-type. (not particular involved in serving them)

A middleware that does something based on content type, for example a middleware FileServer-like on a subset of content-types(images) that Resize based on request query string/params

An app that copy files from storage services (like azure blog storage). So you can use the FECTP to save the correct content type.

If tomorrow, a ByteHeaderContentTypeProvider is created and used on other middleware, like the FileUploadSafeBlockerMiddleware, does it make sense to make it on that middleware?

I don't know, content-type mapping is way separate from a static files middleware from my pov. It doesn't feel (gut-feeling) like a good place. I just wanted to let you know, maybe it IS the right thing.

@Tratcher
Copy link
Member

Those are some interesting ideas, but none of them are on our roadmap. There's also no obvious alternative home for it right now. We can move it later and type-redirect if we need to.

@smbecker
Copy link

I would think the obvious home to be aspnet/FileSystem. I can certainly see the value of having this type available outside of StaticFiles.

@Tratcher
Copy link
Member

FileSystem doesn't know anything about mime-types, or HTTP for that matter.

@Bartmax
Copy link
Author

Bartmax commented May 11, 2016

@Tratcher isn't usefull that FileSystem knows about mime-types? just asking.

@Tratcher
Copy link
Member

Mime types are a HTTP concept (more or less), where Microsoft.Extensions.FileProviders is a much lower level component that operates independent of the HTTP stack.

@fescoffier
Copy link

I think aspnet/HttpAbstractions would be a good place since it is more global HTTP concern.

@aspnet-hello
Copy link

This issue is being closed because it has not been updated in 3 months.

We apologize if this causes any inconvenience. We ask that if you are still encountering this issue, please log a new issue with updated information and we will investigate.

ryanbrandenburg pushed a commit that referenced this issue Nov 22, 2018
…d tests.

#1443 Block unsolicited wsfed logins by default.
#1520 Update WsFed to use the 2.0 event structure
#1425 Implement WsFed remote signout cleanup
Rework WsFed RemoteSignOutPath logic to work with ADFS #1581
Update versions, dependencies.
@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants