Jump to content

Recommended Posts

I'm looking for ideas on the best way to do this.

 

I made a program in PHP that takes in 2 mp4 files, it grabs a screen shot using ffmpeg from 1, and then uploads all 3 files to FTP.

 

However all this happens all at once, with no indication of what is going on.  I'm having a lot of trouble figuring out how to do the file upload part with ajax because It has to be sent from the Form so the $_FILES array is set with the right information.  So i tried out some iframes and its not going well.

 

My idea so far, which is failing, is to just do the FTP and open a separate window that checks the size of the files and returns them.  But its getting very convoluted, and popups suck.

 

Any suggestions on a different approach?

Link to comment
https://forums.phpfreaks.com/topic/186117-file-upload-progress/
Share on other sites

Not quite, I can't get feedback easily.

 

Lets say I use the hidden iframe and it uploads the data.  How can i access $FILES['file']['tmp_name'] back in js?

 

Would you say maybe echo out the data you wanted and use iframe.contentDocument.body. whatever and go get the data that way?

Link to comment
https://forums.phpfreaks.com/topic/186117-file-upload-progress/#findComment-982895
Share on other sites

	var iframe = document.createElement("iframe");
iframe.setAttribute("id","ajax-temp");
iframe.setAttribute("name","ajax-temp");
iframe.setAttribute("width","0");
iframe.setAttribute("height","0");
iframe.setAttribute("border","0");
iframe.setAttribute("style","width: 0; height: 0; border: none;");
form.parentNode.appendChild(iframe);
window.frames['ajax-temp'].name="ajax-temp";

Link to comment
https://forums.phpfreaks.com/topic/186117-file-upload-progress/#findComment-982896
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.