Site structure
Version 4.x > Site structure > Retain original file extension on bulk upload of files? View modes: 
User avatar
Member
Member
svs.venkat-gmail - 9/9/2009 1:23:30 PM
   
Retain original file extension on bulk upload of files?
Hello,
Using the "File import" module I was able to import a set of files.
I am using the following options in the Site settings:
Files Settings:
Store files in file system: checked
Store files in database: unchecked


URLs Settings:
Friendly URL extensions: .aspx
Files friendly URL extension: /blank/
Excluded URLs: /blank/ (Note that I cannot enter all the possible URLs. There are too many!)
Default URL path prefix: /blank/
Use name path for URL path: unchecked


I would like to access the imported files on the live site with the original extension of the files. For example, if I uploaded two files a1.html and a2.html (a1.html contains an internal relative link to a2.html) to the path /Test, I would like to access them as

http://localhost/Test/a1.html and
http://localhost/Test/a2.html

Currently, I am able to access them only as
http://localhost/Test/a1.aspx and
http://localhost/Test/a2.aspx

And the internal link in a1.html breaks. Any way to retain the original extension of the file(s)? in the option: "Excluded URLs"

Thanks,
Venkat

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/10/2009 2:20:53 AM
   
RE:Retain original file extension on bulk upload of files?
Hi,

In version 4.0 you need just to set the IIS to use custom 404 handler, it is described here. You only need to set the IIS to use handler404 page from that description.

Then, when the file is imported, please check on the Properties tab -> URLs, if in the Extended properties section is the extension you want to use.

Now you can access the file using .aspx and e.g. .jpg extension if it is an image.

More about the URLs section can be found in this article.

Best Regards,
Juraj Ondrus