JQuery html5 download plugin. How to use it?

I think I found a really cool plugin for loading jQuery files, but it looks like they don't have an example on the server side of PHP, and I'm a bit overloaded with how to configure it.

Can you kindly help me and show me how to use it?

Here is a link to their page:

https://github.com/mihaild/jquery-html5-upload

+3
source share
2 answers

I don't know the plugin, but basically you need to set the url where the files should be sent (see example.html file on github):

$("#upload_field").html5_upload({
    url: /*PATH TO PHP FILE.php*/,
    ...

The PHP file depends on what you want to do: store the files in the database, store them on the server ... However, if you want to save them in a folder, take a look at this code that I used in the HTML5 file loader:

//Count files
$count = count($_FILES['file']['name']);
for($i = 0; $i < $count; $i++){
    //Path
    $filepath = 'upload/'.basename($_FILES['file']['name'][$i]);

    //Save file
    move_uploaded_file($_FILES['file']['tmp_name'][$i], $filepath);
}

, , .. : $_FILES['INPUT NAME HERE'][.....

+1

jquery-html5-upload, , , ...

, , HTML5 Jquery :

:: html5-file-upload-jquery-php

html5uploader

: jQuery-File-Upload

Ps:

jquery-html5-upload , .

0

All Articles