Jump to content

Video File Upload not working with API


shogun
 Share

Recommended Posts

Going crazy, I have a simple script pulling a file from an html form and sending the file to a template/ directory

No errors at all, but the file just wont save in the directory

HTML

 <input type="file" id="formdata_video_upload" name="formdata_video_upload" >

PHP

$video = new WireUpload('formdata_video_upload');

   $upload_path = $config->paths->templates . "videosubmissions/";
    $video->setMaxFiles(1);
    $video->setMaxFileSize(10485760);
    $video->setOverwrite(false);
    $video->setDestinationPath($upload_path);
    $video->setValidExtensions(array('mp4'));

    // execute upload and check for errors
    $videofiles = $video->execute();

 

 

Link to comment
Share on other sites

Update, this was a nightmare. After messing with it for hours, my solution was to completely scrap the built in class.

Ended up using dropzone js and custom php to upload the file into the appropriate directories.

good luck if you come across this years later! Cheers

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...