qote

qote supports this item

Supported

46 comments found.

is it only upload script application or also given :: how to download the file by the users

Hi, is it possible you make a sample of code how to integrate this uplaoder with a form, eg. text-area, your_uploader and a submit button? It will be grate :) Thanks many many.

Hello,

For anybody who wants save the rute of the file here is the code (there is only save the rute…if you want to save anything else say me how…because I can’t until now), and the other error I see is, the name of the file…even if you change for a unique name..in the database always save it with the original name BUT the name of the file is changed, so there is an error in this part…if you can fix this, please share

 
    require_once($_SERVER['DOCUMENT_ROOT'] . '/root of the file/RealTimeUpload.php');
    $clientIP = $_SERVER['REMOTE_ADDR'];
    $settings = array(
        'uploadFolder' => 'root file (/files)',
        'maxFileSize' => 12000, // max file size in KB
        'extension' => ['mp4', 'avi', 'mkv', 'mp3', 'ogg', 'wav'],
        'rename' => false, // required for security
        'overwrite' => false, // if set to false, file with identical name will be renamed
        'maxFolderFiles' => 0, // number of file that can be uploaded in the destination folder (NOT file per user)
        'maxFolderSize' => 0, // size in KB, 0 means no limit
        'protectUploadDirectory' => false, // disallow listing or execution within the upload directory
        'denyUploadDirectoryAccess' => true, // disallow access to the upload folder
        'uniqueFilename' => false, // if set to true, generate a random filename for each uploaded file
        'returnLocation' => true, // return the url of the uploaded file
        'maxWidth' => 0, // maximum width allowed for an image
        'maxHeight' => 0, // maximum height allowed for an image
        'notification' => true, // maximum height allowed for an image
    );
    $uploader = new RealTimeUpload();
    $uploader->init($settings);

    $status = $uploader->status(); // Here we use the PHP API status() to make sure that the file has been uploaded
    if($status == 'uploaded') { // if upload is successful

        include_once($_SERVER['DOCUMENT_ROOT'] . '/configuration file root/config.php');

        // We use the PHP API name() to get the uploaded file's name
        $name = $uploader->name();

        // We recover the value of the userID text input (these data I can't sent to the database... always save me in NULL
        $filename = $_POST['filename'];
        $id = $_POST['id'];
        $username = $_POST['username'];
        $id_user = $_POST['id_user'];

        $req = $conn->prepare('INSERT INTO TABLENAME(filename, file, id, username, id_user) VALUES(:filename, :file, :id, :username, :id_user)');
        $req->execute(array(
            'filename' => $filename, 
            'file' => $name,  // this is the rute of the file..is save it in DB
            'id' => $id, 
            'username' => $username, 
            'id_user' => $id_user 
        ));
    }

It save it, but only the rute of the file…if you want save more data, until now I don’t know….if you knows please share because the seller don’t show anymore

the error I see is, the name of the file…even if you change for a unique name 'uniqueFilename' => false, // if set to true, generate a random filename for each uploaded file ..in the database always save it with the original name BUT the name of the file is changed and because that you never can see the file went you try to see it insede of your website, so there is an error in this part…if you can fix this, please share

Best Regards!

PD: if you can save with this code, the RealTimeUpload.php is a little bit different, so sent me a message and I will sent you the file

troiweb

troiweb Purchased

Hello. uploadForm.start(); – doesn’t start. What is the reason? I have checked everything

troiweb

troiweb Purchased

Can i get the Example 2 from here – https://0.s3.envato.com/files/179928881/index.html

Hi, Nice script, install + Re skin +~ 45 Seconds, Thanks, my brother can now clean his Sd Card from of his travels

[troll on] And I can spy all lollllllllllllllll [troll off]

by
by
by
by
by
by