I would like to build a webpage(simple form) where users can submit media files, most likely video files. The video files will be anywhere from 100mb – 500mb(or possibly more, depending on the file compression) I was wondering if you could recommend any hosting plan(or company) that may fit my requirement.
I was thinking that I will be writing php script to upload the file but I’m not sure if PHP would be the right one. If you could also happen to know any uploading options you could suggest(even 3rd party uploader), that will be very appreciated.
Thank you
Advertisement
Answer
You can simply use php, it’s capable of handling file uploads. No need to spend money on a third party. For the font-end, you can use the javascript Form Api or any file upload library.
Another thing to take note is to properly validate the files before uploading. A handy library for doing is is Helga ( I maintain it ). It can be found here https://github.com/phrenotype/helga.
Code for validating if a file is clean is as simple as
use ChaseHelgavalidate; $path = '/files/pdf.pdf'; $v = validate($path)->withRules(['file']); if($v->passed()){ // Do something ? }else if($v->failed()){ //Errors ? var_dump($v->flatErrors()); }
Bottom line is, you don’t need a third party platform. PHP is capable of handling it. However, you’re now responsible for your files.