Re: [WSG] force download a media file
Hi all, I am very glad and thankful to you all for your time to respond to my mail. Thank you all for the advice and tips given. Actually when i used force download what i meant was the save as window to come instead of the media file being played by the browser (thus giving the freedom of choice to the user). In the mean time, i could find out that my server supports CGI and pearl..but m not familiar with these technologies. I did be glad if someone can help me in this. thanks in advance. Regards Sijo Louis On 6/13/07, Nick Gleitzman [EMAIL PROTECTED] wrote: On 13 Jun 2007, at 8:10 PM, SJL wrote: I have this problem where i want to force download... I actually want the save as window to appear and give the choice to the viewer. Hmm. I've been following this thread, with its discussion of headers, MIME types and content-disposition, and I have to say that your post suggests a fundamental dilemma, even before you get to all the server-side shenanigans: you can't force your visitors to do anything - and especially not if you want to 'give them choice' as well! The web is unique, in that it's a user-configurable medium. In the same way that we shouldn't try to serve the same pixel-perfect layouts to every visitor, you shouldn't expect to be able to 'force' your visitors to download a file. If their browser is configured with a helper app that handles your file inline, let it happen! Savvy surfers expect a measure of control - or at least the illusion of control - over their experience. That's why you hear, over and over, not to use pop-ups, new windows, or other practices that take that control out of their hands. They don't like it - and they'll go somewhere else. 'Podcasts' all over the web (and I quote the word because it's becoming a generic term for a downloadable audio file) are supplemented with a single, simple instruction: 'Right-click (or Control-click) and choose Save As...' Now *that's* giving your visitors choice. N ___ omnivision. websight. http://www.omnivision.com.au/ *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] force download a media file
correction its PERL no PEARL, thanks On 6/13/07, Nick Gleitzman [EMAIL PROTECTED] wrote: On 13 Jun 2007, at 8:10 PM, SJL wrote: I have this problem where i want to force download... I actually want the save as window to appear and give the choice to the viewer. Hmm. I've been following this thread, with its discussion of headers, MIME types and content-disposition, and I have to say that your post suggests a fundamental dilemma, even before you get to all the server-side shenanigans: you can't force your visitors to do anything - and especially not if you want to 'give them choice' as well! The web is unique, in that it's a user-configurable medium. In the same way that we shouldn't try to serve the same pixel-perfect layouts to every visitor, you shouldn't expect to be able to 'force' your visitors to download a file. If their browser is configured with a helper app that handles your file inline, let it happen! Savvy surfers expect a measure of control - or at least the illusion of control - over their experience. That's why you hear, over and over, not to use pop-ups, new windows, or other practices that take that control out of their hands. They don't like it - and they'll go somewhere else. 'Podcasts' all over the web (and I quote the word because it's becoming a generic term for a downloadable audio file) are supplemented with a single, simple instruction: 'Right-click (or Control-click) and choose Save As...' Now *that's* giving your visitors choice. N ___ omnivision. websight. http://www.omnivision.com.au/ *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] force download a media file
The choice on how to handle any MIME type is in the hands of the downloading application and cannot be controlled by the source site. If it was not for this, it would be too easy for a site to infect any target operating system with malicious intent. Regards, Gary [that is - if you find a way to do it, it is a fault in the browser] On 6/13/07, SJL [EMAIL PROTECTED] wrote: Hi all, I have this problem where i want to force download and mp3 and mp4 format file, but by default the browsers are handling it. I actually want the save as window to appear and give the choice to the viewer. I have goggled and tried a lot of them, but nothing worked, as my server doesnt support asp/php. can it be done using javascript/ajax? Kindly advice. Thanks and regards, Sijo Louis *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] force download a media file
On Wed, 13 Jun 2007 15:40:39 +0530, SJL wrote: I have this problem where i want to force download and mp3 and mp4 format file, but by default the browsers are handling it. I actually want the save as window to appear and give the choice to the viewer. Zipping the file is the only way I know of to ensure a download. warmly, Lea -- Lea de Groot Elysian Systems Brisbane, Australia *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] force download a media file
was just going to say that you could set a header with PHP, but then noticed that you don't have it. Nick Gary Menzel wrote: The choice on how to handle any MIME type is in the hands of the downloading application and cannot be controlled by the source site. If it was not for this, it would be too easy for a site to infect any target operating system with malicious intent. Regards, Gary [that is - if you find a way to do it, it is a fault in the browser] On 6/13/07, *SJL* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi all, I have this problem where i want to force download and mp3 and mp4 format file, but by default the browsers are handling it. I actually want the save as window to appear and give the choice to the viewer. I have goggled and tried a lot of them, but nothing worked, as my server doesnt support asp/php. can it be done using javascript/ajax? Kindly advice. Thanks and regards, Sijo Louis *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] *** *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** -- Nick Roper partner logical elements *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] force download a media file
Lea de Groot wrote: On Wed, 13 Jun 2007 15:40:39 +0530, SJL wrote: I have this problem where i want to force download and mp3 and mp4 format file, but by default the browsers are handling it. I actually want the save as window to appear and give the choice to the viewer. Zipping the file is the only way I know of to ensure a download. Have you tried adding a header with something similar to below.. Response.AppendHeader(Content-Disposition,attachment; filename=\ + strFileToDownload + \); Response.ContentType = audio/mpeg; ./C *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] force download a media file
In regard to content-disposition The following RFC states (very late in the text in the section on Security) In general, the receiving MUA should not name or place the file such that it will get interpreted or executed without the user explicitly initiating the action. http://www.ietf.org/rfc/rfc2183.txt So - while it may seem like content-disposition is an answer, a well behaved MIME-type interpreter should still ask the user what they want to do with the file. So, this still does not (or at least should not) allow an MP3 (or any other file) to be run or executed without the users intervention. At minimum, the behaviour for content-disposition is not guaranteed. In fact, some browsers continue to be naughty in that they actually DOWNLOAD the file first (to some temporary location), then fire up an appropriate application to handle the MIME type against the downloaded file rather than running the handling application as a plug-in (freestanding or embedded) and passing it the address/URL of the resource to process. Regards, Gary On 6/13/07, C. Bergström [EMAIL PROTECTED] wrote: Lea de Groot wrote: On Wed, 13 Jun 2007 15:40:39 +0530, SJL wrote: I have this problem where i want to force download and mp3 and mp4 format file, but by default the browsers are handling it. I actually want the save as window to appear and give the choice to the viewer. Zipping the file is the only way I know of to ensure a download. Have you tried adding a header with something similar to below.. Response.AppendHeader(Content-Disposition,attachment; filename=\ + strFileToDownload + \); Response.ContentType = audio/mpeg; ./C *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] force download a media file
And I forgot to add... By the time you could execute Javascript (and that would not be possible once the MIME type has been specified) the browser would have already decided what to do with the content (NOTE: I cannot see how you could execute any JS once you were outside of the HTML MIME type). Regards, Gary On 6/13/07, Gary Menzel [EMAIL PROTECTED] wrote: In regard to content-disposition The following RFC states (very late in the text in the section on Security) In general, the receiving MUA should not name or place the file such that it will get interpreted or executed without the user explicitly initiating the action. http://www.ietf.org/rfc/rfc2183.txt So - while it may seem like content-disposition is an answer, a well behaved MIME-type interpreter should still ask the user what they want to do with the file. So, this still does not (or at least should not) allow an MP3 (or any other file) to be run or executed without the users intervention. At minimum, the behaviour for content-disposition is not guaranteed. In fact, some browsers continue to be naughty in that they actually DOWNLOAD the file first (to some temporary location), then fire up an appropriate application to handle the MIME type against the downloaded file rather than running the handling application as a plug-in (freestanding or embedded) and passing it the address/URL of the resource to process. Regards, Gary On 6/13/07, C. Bergström [EMAIL PROTECTED] wrote: Lea de Groot wrote: On Wed, 13 Jun 2007 15:40:39 +0530, SJL wrote: I have this problem where i want to force download and mp3 and mp4 format file, but by default the browsers are handling it. I actually want the save as window to appear and give the choice to the viewer. Zipping the file is the only way I know of to ensure a download. Have you tried adding a header with something similar to below.. Response.AppendHeader (Content-Disposition,attachment; filename=\ + strFileToDownload + \); Response.ContentType = audio/mpeg; ./C *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] force download a media file
On 13 Jun 2007, at 8:10 PM, SJL wrote: I have this problem where i want to force download... I actually want the save as window to appear and give the choice to the viewer. Hmm. I've been following this thread, with its discussion of headers, MIME types and content-disposition, and I have to say that your post suggests a fundamental dilemma, even before you get to all the server-side shenanigans: you can't force your visitors to do anything - and especially not if you want to 'give them choice' as well! The web is unique, in that it's a user-configurable medium. In the same way that we shouldn't try to serve the same pixel-perfect layouts to every visitor, you shouldn't expect to be able to 'force' your visitors to download a file. If their browser is configured with a helper app that handles your file inline, let it happen! Savvy surfers expect a measure of control - or at least the illusion of control - over their experience. That's why you hear, over and over, not to use pop-ups, new windows, or other practices that take that control out of their hands. They don't like it - and they'll go somewhere else. 'Podcasts' all over the web (and I quote the word because it's becoming a generic term for a downloadable audio file) are supplemented with a single, simple instruction: 'Right-click (or Control-click) and choose Save As...' Now *that's* giving your visitors choice. N ___ omnivision. websight. http://www.omnivision.com.au/ *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***