Solved

PHP upload resume

Posted on 2014-03-24
13
1,767 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 3
13 Comments
 
LVL 110

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 56

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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 110

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 110

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
 
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 110

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 56

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 56

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 110

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 Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
htaccess - disable PHP in specific directory 1 16
php subtract from date 2 26
Jquery if else not working ... WHY? 5 23
Find RGB colors from a screen. 2 15
PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

740 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