Open jackttcoms opened 5 years ago
Hi @jackttcoms It needs chunks of file data and yes you can do it with js like flow.js or FineUploader lib.
It By default check list of valid mime types. Do you have any suggestion?
Wonderful. Not not really. It looks very secure to me 👍 .
Also does this have random file name capabilities? e.g. upload bob.zip and it uploads it as ajhdbfjfbjfbgjkwgbjkgbwjkfwbjkbgj.zip and can you please create a working sample so i can see how it works properly.
Can i explain my needs for my project. Basically I have a form with 5 input fields. I only need the chunking for one field (the zip field), can i achieve this with your class. Do everything at the same time? Click submit.....chunk file and insert data into database?
Here are the fields: Name Bio Image Image Zip
Thanks very much.
Ok.
Yes you can. you should set a js lib for Zip input that send chunked data to server then in server you should pass data to my package
Hi, can this be done with jquery file upload? if so would it be possible for you to create a really simple working example?
This is my code so far based on urs but am unsure with certain elements if i am doing it right so help would be much appreciated in getting a working chunk upload form working. Thanks
<?php
//add composer autoloader
require '../vendor/autoload.php';
use MehrdadDadkhah\Video\ChunksUploader;
$uploadHandeler = new ChunksUploader();
$uploadHandeler->setMainFileName('avatar.jpg') //main file name ??? dynamic name
->setFileTotalSize($_REQUEST['totalfilesize']) //size of main file (big file)
->setInputName('files') //your form input file name
->setChunksFolderPath('../chunk-folder') //path to folder for upload chunks files
->setUniqueIdentifier('unique-id' . time()); // set unique identifier for each upload (for example user id + time or ...) a unique indentifier per each upload ??? have i done this right
$uploadHandeler->checkAndGenerateOutputDirectory();
$uploadResult = $uploadHandeler->uploadChunk('name-of-chunk-or-chunk-number'); //should be a sortable name ??? confused here
$uploadResult = $uploadHandeler->setUploadDirectory('../uploads') //main directry path to upload (combine chunks here)
->finishUpload();
Thanks
Can this work with ResumableJs????
Yes, it can. You should only pass data that ResumableJs send to server @jackttcoms
Any chance of an example of your script in use? Thanks
Does this require any javascript? Also out of 10, how secure would you say this class is? Thanks