Is there a way to make movies that I upload to my website play, and not download?

Question by Daniel N: Is there a way to make movies that I upload to my website play, and not download?
I have movies saved to my computer, ranging from 700MB-2.1GB (Most are 700MB). When I upload them to my website, instead of having them play, they download instead. Is there a way to make it play?

I’m experienced in HTML and CSS, and mildly experienced in JavaScript. Please include codes.

Best answer:

Answer by Ak3la
The size of the file is not the issue, although I appreciate that you tried to include as much information as possible. What you need to check is what the file type, or “extension”, is after the files have been posted. Then check your browser’s settings to see what program, if any, is “known” by the browser to support that file type.

For example, let’s say that the files are in the .avi format. When they are on your computer, you can “play” them by double-clicking on the file name in the explorer, search results, or other window that displays the file name. This works because at some point, an entry was made in the Windows registry that associates a particular program with that file type. The file type “.txt”, for example, is most often associated (on Windows machines) with the Notepad application. Try this sometime: start Notepad, type in some text, then save it. When asked for the file name, type in “stuff.nil” and hit save. Exit from Notepad. Now, look at your Documents folder, and you should see a file called “stuff”, but its icon will be a blank, white “page”. If you are using the “details” view, the file type column will say that it is a “NIL file”, or something like that. If you double-click on it, even though you just created it in Notepad, it will *not* be loaded into Notepad, because Windows does not know what program to start when it sees the “.nil” extension. Note that, in some configurations, Notepad will automatically add the “.txt” to *whatever* you type, so you may get a file called “stuff.nil.txt”, which *will* open in Notepad when you double-click on it. Sorry if this exercise doesn’t work for you…

Clicking on a link on a web page works similarly: the browser must have an association between the file type of the object referenced by the link and some program that is invoked to “open” that file. If it does not know what to do with it, rather then “give up”, it will start a download of the file, so that at least you can “get” what you requested.

If you can play these movies successfully on your computer, but cannot play them when you post them to a web page, then either the file extensions have changed during the process of uploading and posting, or your browser does not know how to open them. If you “hover” your mouse cursor over the link, you should be able to see its full URL: make sure that the “.avi” (or whatever) is there, just as it is on the original files on your hard drive. Then go into your browser’s settings for application associations (sometimes called just “programs”; it will depend on the browser that you use) and see if it has an entry for “playing” those files. If not, try to set one up; post another question here if you need more help.

This is the first and most likely reason for the behavior that you describe; I apologize if you have already checked these things and still have trouble. Again, please post a new question — and describe the things that you have already tried — if you still need help. Mention also which operating system you use, what browser, and so on: the more information we have about what you are doing (and what you have already done), the more likely it will be that we can help.

Looking at the file sizes that you describe, I am concerned that they may be “ripped” tracks from one or more DVD’s, and you should know that “sharing” commercial works like this is a crime. It is called “copyright infringement”, and we are not talking about littering in the park here: this is a federal offense, and can carry jail time and six-figure fines. I apologize for the “lecture” if this is not the case, and I am not accusing you of anything, but it is important to me that you understand the implications if you are attempting to do this.

Give your answer to this question below!

Get the book now