[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2058
  • Last Modified:

PHP upload resume

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
justaphase
Asked:
justaphase
  • 5
  • 5
  • 3
1 Solution
 
Ray PaseurCommented:
No particular "system" in mind, but FTP is what makes the most sense for large file transfers.
0
 
Julian HansenCommented:
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
 
justaphaseAuthor Commented:
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Ray PaseurCommented:
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
 
justaphaseAuthor Commented:
Only administrators in a backoffice tool will upload the video files.
Some files could reach the 1 Gb..
0
 
Ray PaseurCommented:
If you trust the Admins, give them the FTP tool.  1GB is pretty big, but it should work, in theory.
0
 
justaphaseAuthor Commented:
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
 
Ray PaseurCommented:
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
 
Julian HansenCommented:
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
 
justaphaseAuthor Commented:
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
 
Julian HansenCommented:
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
 
Ray PaseurCommented:
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
 
justaphaseAuthor Commented:
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now