Download File Extension Allow

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 anni tempo fa
Hello Dear's

I am using NopCommerce 4.1
I have some files in wwwroot/download folder for direct download
but i encountered a problem in pptx and iso file download
i don't any problem with zip or rar files

please assistance
3 anni tempo fa
Any update?

i get "Not Found" while downloding iso files
3 anni tempo fa
Hi,

Do you have access to the web server (IIS)?  You need to add a MIME Type entry for each file type.

From IIS Manager, go to Sites > YOUR_SITE> and in the features view, double-click MIME Types.

http://angelawandrews.com/2017/12/04/404-error-when-downloading-iso-file-on-iis/

Jon

i2ib4sunshine3 wrote:
Any update?

i get "Not Found" while downloding iso files
3 anni tempo fa
Dear's

Thanks for your Reply
I have access to IIS and I had add MIME Type to My Site, but it don't work.
I still get "Page not found" Error
3 anni tempo fa
i think found the problem

the problem is the IsStaticResource method:

var contentTypeProvider = new FileExtensionContentTypeProvider();
return contentTypeProvider.TryGetContentType(path, out var _);

the FileExtensionContentTypeProvider send always a fix set of mime type that don't care of IIS mime type

have any idea?
3 anni tempo fa
try adding this line after
var contentTypeProvider = new FileExtensionContentTypeProvider();


contentTypeProvider.Mappings.Add(".iso","application/octet-stream");




i2ib4sunshine3 wrote:
i think found the problem

the problem is the IsStaticResource method:

var contentTypeProvider = new FileExtensionContentTypeProvider();
return contentTypeProvider.TryGetContentType(path, out var _);

the FileExtensionContentTypeProvider send always a fix set of mime type that don't care of IIS mime type

have any idea?
3 anni tempo fa
i know this work, but i want a solution without change the Source Code

anyway, So Thanks for your replay
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.