Sergi
Sergi

Reputation: 417

How do I load local files to a front-end html5 runing on apache2 localhost

I can't realize how to load a video located on my Desktop on a front-end code I have in my localhost runing on apache2. I tried: file:///localhost/home/Desktop/video.mp4 , but It doesn't work because for sure, I'm not right.

Thanks!

Upvotes: 0

Views: 67

Answers (1)

zolamk
zolamk

Reputation: 6377

file protocol loads local files, first you have to use the http protocol, then apache will look for files in your document root directory so all paths will be relative to the document root, so first you have to set the correct document root, then use the correct protocol.

it would be like http://localhost/video.mp4

Upvotes: 1

Related Questions