Hi,
I’m trying to create a file download, I figure I could do this via a Static Resource and add the file and choose Attachment type, but it just downloads the .html page. I’m trying to allow a download of a zip archive. I also tried adding a mime/content type for zip but just seemed to break the URL(loaded a 404 not found).
Would I have to make a redirect to the file on my server? Or am I missing something for the Static Resource?
Thanks!
hi,
i must say i do not exactly understand where the problem is... set a download on a file is just linking to it ! particularly with zip/rar files (with an image, if you don’t want your users to open the image in the browser, you would have to write some php or js)
then if you download link is located inside some text, just link to it using the RT editor file manager, if it’s standing alone, you can do that with a TV or two (the second one if you want a link text different from the filename
Have swing
réfléchir avant d'agir
What is the point of the "Attachment" option then? Or the Static Resource option? I’ve read users having PDF files downloaded using the Static Resource option, so don’t see why I can’t do it with a zip?
Hi
Static resources could be usefull if you want to locate your files outside of the webroot. Then you can assign user/group permissions to the static resource to allow which user/group can download the file, etc...
Well, that’s what I’m trying to do, but it won’t take a zip file. I assume it shouldn’t just take .html? Perhaps I’m just not understanding. I would assume an "attachment" type would....well, attach any kind of file?
Have you tried this:
<a href="URL_of_file">Download file x</a>
You might not need a static resource unless you want to either schedule publication, or control access via resource groups.
That said, try setting:
Content Type: .zip
Content Disposition to inline, or attachment (try both)
Uses Template to "none."