Solved

PHP upload resume

Posted on 2014-03-24
13
1,678 Views
Last Modified: 2014-03-26
Hello dear Experts,

I have a good upload tool using jquery pluploadQueue and is good for small/medium files.

But i have a project where the goal is to sell big video files.

I've been struggling with google to find a way to upload a big file and resume it, if it fails in the middle of the upload.
There are some good approaches like "tus" (http://tus.io/demo.html). Its amazing because it uses http. The problem is the installation.. need to install go programming language in the server and the go program (i only installed the go programming language, the rest is a real pain.. it's not practical to implement in host web-servers).

I've been looking for others but have not find a good one... and Java is not a good solution..

php/ftp would maybe be a good solution, i don't know..

Anyone know a good system? Anyone had a good experience or implemented a good solution for this?

Thx in advanced,
Miguel
0
Comment
Question by:justaphase
  • 5
  • 5
  • 3
13 Comments
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 39950280
No particular "system" in mind, but FTP is what makes the most sense for large file transfers.
0
 
LVL 51

Expert Comment

by:Julian Hansen
ID: 39950377
I don't think FTP is going to work for you. If I understand your query you ideally want to upload through a web interface.

Have you had a look at jQuery-File-Upload?

http://blueimp.github.io/jQuery-File-Upload/basic.html
0
 
LVL 1

Author Comment

by:justaphase
ID: 39950566
On "jQuery File Upload" says it resumes...
but i can't find a single working example on the web... only the explanation: https://github.com/blueimp/jQuery-File-Upload/wiki/Chunked-file-uploads
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 39950685
jquery pluploadQueue
I think our author is already using a jQuery tool.

There may be some kind of Flash uploader, but SWF Upload seems to have fallen into disuse.  Absent a demonstrated better solution, I would still go with plain old FTP.  Free: https://filezilla-project.org/

If you want to tell us a little more about the project, like who will upload the files and what size is a "big video" we might be able to offer some more specific suggestions.
0
 
LVL 1

Author Comment

by:justaphase
ID: 39950831
Only administrators in a backoffice tool will upload the video files.
Some files could reach the 1 Gb..
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 39951640
If you trust the Admins, give them the FTP tool.  1GB is pretty big, but it should work, in theory.
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 1

Author Comment

by:justaphase
ID: 39952553
ftp tool? what you mean?
the situation here is to upload a video file related to a MySQL record on demand.
something fast and easy to do.

Imagine you have a race exhibit with the title and explanation of the exhibit, and you want to upload a video file to that record. i was not looking for a "upload first and relate after" if that is what you mean...
How does youtube do?.. i just tried to upload a 1 Gb file and at 3% i closed the tab browser, and when i opened youtube again and uploaded the same file, youtube resumed it at 3%.. that's what i want :\
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 39953188
upload a video file related to a MySQL record on demand
I interpret "upload" to mean that you have a video file on a local computer (PC, Mac, Tablet, Phone) and you want to transfer the file to a server so that others can watch the video.  I haven't got a clue about what you mean by "related to a MySQL record" or "on demand" so if you can give us a clearer explanation of those parts of the requirement it will help.

The FTP tool is FileZilla in a link posted earlier.

Maybe we're beginning to get to the "meat" of the question.  Perhaps I am still misunderstanding it, but it sounds to me like you're in for a major amount of application development.  To try to limit the cost and time involved, here are the things I would explore.

See if Vimeo can offer any help.  Consider using YouTube for your video host.  Both of these services offer APIs that you may be able to program for your needs.

If the APIs do not look promising and you have sufficient budget you might consider taking the project to the computer science department of a nearby college.
0
 
LVL 51

Expert Comment

by:Julian Hansen
ID: 39953501
I interpret "related to a MySQL record" to mean there is meta data for the video stored in a MySQL database. By uploading through FTP you would need to "relate" the video to its meta data after the fact.

Hosting your files is probably the best option. I would look at Amazon S3 / CloudFront with their temporary URL functionality.

If you want to pursue looking at the uploader these articles might be of use in providing some background

https://hacks.mozilla.org/2011/04/resumeupload/
https://hacks.mozilla.org/2011/01/how-to-develop-a-html5-image-uploader/
0
 
LVL 1

Author Comment

by:justaphase
ID: 39953544
Sorry Ray, maybe my bad.
I did not explained well in the beginning. I assumed that the Topics (PHP Scripting Language ,Apache Web Server ,Jquery) would help me explain what i want.

Vimeo and Youtube can't help me since the goal is like i said in the first post: sell video files to people who will pay for them and use or have a premium subscription.

My backoffice is practically finished and i have a good upload tool working well. But i didn't realized that files could be so big. So only need this to finish my project.

julianH, i already saw that tool, unfortunately only works with Firefox :(
0
 
LVL 51

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 39953579
Vimeo - can help you they will sell your videos on your behalf. Their new player supports in player purchasing. You upload your video and set the price etc - they sell it for a cut.

Having said that - back to the JQuery Upload tool. Take a look at these articles

https://github.com/blueimp/jQuery-File-Upload/wiki/Chunked-file-uploads

http://www.htmlgoodies.com/html5/other/using-html5-and-the-blueimp-jquery-file-upload-plugin-to-upload-large-files.html#fbid=shmSVhpTzwG

The above will only work on browsers that support XHR file uploads which include Firefox and Chrome.

As for the browser - you said in an earlier post this was part of an admin backoffice application - which I took to mean - not available in the wild - so do you not have some control over setting what browser should be used for this?
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 39953594
Files that are "big" are only big in relation to the speed of access.  In your case, is there high-speed internet access for upload?  If you can give us some particulars, we might have some suggestions.  I understand there may be 1GB files.  What is your upload speed?  Is this the fastest that your ISP can provide?  Where are the servers?  Is there any chance of being able to copy the files directly, not over the internet?  Is there any reason why you wouldn't be able to break the 1GB up into "chapters" of a large video?

Have you got experience with FFMPEG?  It might be possible to split the files, upload them, then recombine the parts.
0
 
LVL 1

Author Closing Comment

by:justaphase
ID: 39955625
Finally found some good working examples of jquery upload.
Only problem now is set up the webserver, he's giving me problems with some extensions.

Thx
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now