Any views expressed within media held on this service are those of the contributors, should not be taken as approved or endorsed by the University, and do not necessarily reflect the views of the University in respect of any particular issue.

Issues with adding a “plupload” plugin to a site.

Hi All,

Recently I was working on adding a plupload plugin to the video-migrator site. It is a s tool that allows the file upload process to be executed in chunks.

The video-migrator site uses Kaltura to process two video files and put them together as one movie, picture-in-picture.
The installation and set up was fairly quick and simple (for someone who doesn’t know Laravel environment that well yet 😉 ).

The problems starter to come out when I wanted to update some of the initial values dynamically. According to the documentation it  was possible and not complicated… except that it didn’t work.

Whatever I set when initialising the plupload  that was it. Even when dynamically changed (by using jquery) one of the set up options, it was not passed to the php scrip handling the upload. The variable itself was updated to the new value but this new value was just not passed in the POST.

To overcome this issue I had to use ajax and somehow identify the files I just uploaded. The solution was to use a unique temporary folders to store the uploaded files. The trick was to generate the unique folder name before the upload and keep it unchanged/re-generated in the code for the whole upload process.

Once the files were uploaded to the server another ajax call sent the temp folder name to the php script along with the other values I needed (movie titles).

I also had to know which file should be a primary and which secondary one but that was an easy fix with two plupload instances where I could set a tag to specify this.

Based on that I was able to update the files metadata and continue with the task. It was then easy process of creating the xml file for Kaltura to pick up a “job”.

I have tried to identify if the issue is only related to my local set up but my co-workers had the same problem.

A simple workaround solved the issue but I’m still not sure why it wasn’t working as expected in the firs place. Maybe I will have to speak to the plupload tool creators…

Thank you for reading and all the best.

Share

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.

css.php

Report this page

To report inappropriate content on this page, please use the form below. Upon receiving your report, we will be in touch as per the Take Down Policy of the service.

Please note that personal data collected through this form is used and stored for the purposes of processing this report and communication with you.

If you are unable to report a concern about content via this form please contact the Service Owner.

Please enter an email address you wish to be contacted on. Please describe the unacceptable content in sufficient detail to allow us to locate it, and why you consider it to be unacceptable.
By submitting this report, you accept that it is accurate and that fraudulent or nuisance complaints may result in action by the University.

  Cancel