Anytime I post a zip file with a renamed extension to .anything, it will always download as a .zip file. I have organizations that need to download these files, but cannot download .zip files. Is there anyway to have SharePoint not convert the file to .Zip when downloading? I do this all the time on ftp sites to bypass the security issue, but it just doesn't work here.

Thanks!

link|improve this question

feedback

4 Answers

I don't think SharePoint cares about what's in the file, just the extension of it. I'd bet this is IIS and the client browser since there's not a mime type for '.anything'. It's similar to what happens when you download a docx when there's no associated mime type: the browser asks to save the docx as a zip file. Try adding a MIME type of (I think) 'application/octet-stream' for extension '.anything'.

link|improve this answer
Well the .anything was more figurative. I changed the .zip to a .jpg and it still downloaded as a .zip instead. – Eric P Nov 12 '09 at 18:41
I figured, ya. Just meant that I think you need a dedicated mime type for the extension you've chosen. Do you get the same result with other browsers (chrome, firefox, etc.)? – vinny Nov 12 '09 at 18:44
feedback

This is called "magic numbers": first few (usually 3) bytes in a file that identify its format. For instance, ".jar" Java files have 0xCAFEBABE leading bytes. Look through SharePoint configuration, and disable "magic numbers" if there's any option for that.

Also, try other archiving algorithms: i believe it won't recognize *.7z (7zip).

link|improve this answer
.jar files are just .zip files, so it will have the magic number for zip archives. Java .class files, however, do use the magic number you mentioned. Nevertheless, I agree. tar+gzip/bzip2, 7zip, or rar are suitable alternative archiving formats that usually get through security checks. – Suppressingfire Nov 11 '09 at 16:04
Ehm, sure it's *.class! I saw "CAFEBABE" only once in something connected with Java. Brain's not perfect :) – o_O Tync Nov 11 '09 at 19:37
feedback

Try creating a new content type, starting from Document. Then remove(hide?) the file-type attribute.

link|improve this answer
feedback

I don't have this issue on my Sharepoint site. What version of Sharepoint are you using?

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.