Prompt video file for download over http instead of initating stream - http

I'm trying to setup a download page for some video files to mobile devices.
Ideally, I'd like it if I click or navigate to a download link, I'm prompted to download the file (or the file automatically downloads).
Currently, I navigate from my mobile device to:
192.168.1.4/Star.avi
And the video starts playing.
Is there anything I can do server side to prevent this?
Thanks.

Add the header field below:
Content-Disposition: attachment

Related

Is there a way to change speed in Adobe Connect?

I know Adobe Connect launches its separate application but is there a way to change the speed (ie 2x) in the application or some other way?
You can download the page contents including the voice file.
1- Open in the web browser. Then just append
/output/content.zip?download=zip
to the page URL and press enter.
2- Extract the downloaded file. The file with a similar name to 'voip.flv' is the voice file.
3- You can open it with vlc or any other player and make benefit of the speed option.
Example:
If the link is like:
https://connect.labla.la/p9lhdwnhnf89/?session=breez7b98svagh3mqtkqb&html-view=false&proto=true
you can download the content with this link:
https://connect.labla.la/p9lhdwnhnf89/output/content.zip?download=zip
There is no option to change the playback speed of an Adobe Connect Recording. A workaround is to download mp4 version of the recording and serve via a video hosting provider which has video speed option.

Prevent download of MP3 files in wordpress

I know many people asks the opposite of what I am asking. I am trying to make browsers play the file instead of downloading when opening the mp3 files´ link. I do not care if the users download the file after that, but I need the browsers to play the file at first, instead of automatically downloading. It happens in computers and smarthphones.
, b
I don´t know if it is something I have to change in .htaccess file or somewhere else. The link to the site is this: https://cefadchurch.com/sermones/predicas-dominicales/
Try the download button. If you see, it directly sends you to the file´s link, but it starts downloading instead playing. I know a "Download" button function is obviously to make the browser download the file, but that will not be the case for me, because however, if the button sends me to the file´s link, I rather the browser play instead download, and the company has asked me for that function.
In your response headers, you're actively forcing the download in two ways:
Content-Disposition: attachment
Content-Type: application/octet-stream
Firstly, the Content-Disposition header value of attachment forces a download to occur. You must get rid of it if you want to not have a forced download.
Next, the content type of application/octet-stream is the generic binary type, and thus the browser doesn't know how to render it so just downloads it as a file to let the system handle it. If you're sending MP3s, use audio/mpeg for the Content-Type response header.
Finally, not all browsers can/will play media in a tab when you link to the media directly. If you want the file to play in-browser, you need to embed it into a web page with the <audio> tag.

download file and redirect page in asp.net

I want to write a program where after button click page will be redirected and one pdf file will be download. I am writing the following code under the button click event. but it is showing the error.
Response.TransmitFile("Filename")
Response.Redirect("~/Redirect.aspx")
Response.End()
It is impossible, because file download will get HTTP status 200 (with file in response). Redirect is 301/302, but cannot contain file in response.
Moreover when modern browser receive a file it does not change the current URL.
If you really want to have such effect you have to create something on client side. For example you can use jquery file download which has events after download and on error. More on examples page

How to play a video on the default media player on Windows?

Here is the scenario: When you click on the image on homepage, the video should open. It should not be embedded video in a browser. Video should open in a default player. No browser window.
I have a static image on my homepage. When i click this image, i just require the video to run on the default player. The video file is located on the server.
Is it possible or not? And if possible then how can we achieve it?
How about setting proper HTTP headers that enforce to download & open given video?
Content-Type: application/force-download
Content-Disposition: attachment; filename="video.avi"
To make this work you need to use the *.avi extension at the end of your file, and place it on a link.
Now, the behavior will be different on each computer. The browser will ask the user to save the file somewhere and then if the user click on it will be open with the default player. Or in some cases it may direct ash him to open it with the default player, the browser saves it and then play it.
Now so good user interface.

Forcing the browser to pop a save as dialog box from a link pointing to remote url

I am building a web app that lets the user directly download files on a cdn by clicking a link. The link should point to the cdn url directly in order to minimize the load on our servers.
We would like the to have the browser pop up the save as dialog box when the user clicks the link to download the file and not have the browser display the content of the file at all. So the page should not reload. However, we don't have access to setting the HTTP headers sent back from cdn. Is it possible to still pop up the save as dialog box for download using client-side code?
Is it possible to still pop up the save as dialog box for download using client-side code?
No. Unless the file type is something the browser does not understand (or the HTTP header Content-Disposition is "attachment"), the "Save As" dialog will not appear.
This behavior cannot be changed by JavaScript.
The behavior is controlled by the Content-Disposition header, unless the browser simply doesn't understand how to display content of the type returned. Without the ability to change the Content-Disposition header to attachment, you can't force the browser to download the file instead of render it. This must be done server-side.

Resources