Problem with .mp4 files

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Problem with .mp4 files

Postby Apochedio » 08. April 2019 00:29

Good morning,

I have a problem with XAMPP displaying ".mp4" files.
The problem is that instead of having them displayed, it downloads them automatically. How can I make the ".mp4" files appear and not download?

Thank you very much
Apochedio
 
Posts: 1
Joined: 08. April 2019 00:25
XAMPP version: 7.1
Operating System: Ubuntu

Re: Problem with .mp4 files

Postby Nobbie » 09. April 2019 01:55

Xampp neither displays .mp4 nor downloads .mp4 files, that is your browser who does so. Xampp, i.e. Apache is the server and applys the file to the browser. The browser decides about downloads or showing.

If you want an .mp4 file to be displayed by the browser, you should use the HTML5 "video" Tag for it, See https://www.w3schools.com/tags/tag_video.asp for documentation
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Problem with .mp4 files

Postby Aditya k » 01. January 2024 21:24

It sounds like you're dealing with a common issue where XAMPP is set up to download .mp4 files instead of displaying them. This is usually a config thing. In your XAMPP's .htaccess file, try adding AddType video/mp4 .mp4. This line tells your server that .mp4 files are videos, not just files to be downloaded.
Aditya k
 
Posts: 5
Joined: 26. August 2018 19:01
XAMPP version: 3.2.2
Operating System: Windows 10


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 11 guests