sarsnake
sarsnake

Reputation: 27703

Downloading files in asp.net mvc

I have a link that allows the user to download a file. Basically I call the controller action that uses base.File function. I have few different types of files - pdf, doc, text....Is there a contentType I can specify that would work for all these? Or do I need to specify the correct (matching) contentType for each and every file type?

Upvotes: 1

Views: 461

Answers (1)

Alexander Zeitler
Alexander Zeitler

Reputation: 13089

Use "application/octet-stream" for general purposes.

Upvotes: 3

Related Questions