186 comments found.
Hello,
I´d like to use it in a Form Edit, after uploaded. Is it possible? ( with multiple images )
Thanks.
Sorry, not at the moment. This should be made or you could edit the code yourself.
I was looking:
Can I merge “Form usage” and “Existing file(s) usage” presented on samples?
No, sorry. The problem with forms and multiple images is that it cannot work dynamically. Because we cannot control the contents of a <input type=”file”> we cannot have multiple file uploads with a form
Hello,
I love the script and already purchased it but am having a small problem. I’m trying to process the files via AJAX and using Wordpress to handle my uploads with the media_handle_upload() function to process this. According to the codex this requires the Index into the $_FILES array of the upload and I’m just using the multi upload example so I want to upload multiple images and pass the files array to this script. I saw the $_FILES were in the form example but I want the user to be able to submit multiple images in a single upload instead of displaying the upload option multiple times. Is there a way to obtain this information? Thanks in advance.
Hi, it is not possible to have multiple files with the <form> example. When you are not using the <form>, but the multiple upload, the data is found in $_POST[‘data’], encrpyted in base64.
This script looks fantastic – one question that I couldn’t seem to find on your website… This script (I’m looking at the form with file upload) redirects to a new page after submitting – is there an option or instructions on how to offer a same page message rather than page refresh?
You mean via AJAX or ?
I assume so? I don’t care how it’s done – I was just wondering if there are instructions included on how to keep it on the same page rather than a redirect. I’m working on a one page website so I’d like to have clients upload files and fill out a form at the same time but not go to another page – rather just display a success message…Thanks for your time!
Hi, this is possible, but not with the form example, or you could handle all of it with ajax. This way the user will stay on the same page as your request is being loaded (submitted) in the background.
Hello,
I too am interested in saving image file path to db in addition to uploading file to server.
In one case, I’m creating a blog page. I need to have something that can upload the blog header image to server and save path or filename to db.
In another use on my site, I want to upload any kind of file to my db/server such as .doc, .pdf, .txt, etc.
How much do you charge for script editing/freelance?
hi, i can make this for you. I do freelance work for 100 dollars an hour. Send a mail to info[at]stbeets.nl if you are interested and your requirements + serverinformation
Hi. How hard is to change so it adds the image path to a MySQL database? Do you do freelance work as my PHP knowledge is very limited.
hi, it;s not hard, just add your DB connection / insert into canvas.php or form.php (which ever you use). I could do it for you, i do freelance work.
Thanks. I have sent you an email.
Hello i have one question: can you tell me the right way to send a id to the html5fileupload.php. i modify html5fileupload.php to insert every upload in my database but i have some problem trying pass a id to html5fileupload.php Thanks!
Hey stbeets can you help me here?
Hi, sure, you can do this by passing the id with the javascript: $(’.dropzone’).html5imageupload({data: {id: “yourid”}});
I try this whitout success… Javascript: $(’.html5fileupload.demo_multi’).html5fileupload({ data: { userid : myid } }); and this on html5fileupload.php: $myid=$_POST[myid];
not $_POST[‘myid’], but $_POST[‘userid’]
sorry my mistake …this is my code:
js_ $(’.html5fileupload.demo_multi’).html5fileupload({ data: { userid : 1} });
php_ $myid=$_POST[‘userid’];
something is worng because $myid es taking 0 value.
Do you have a demo url where i can see what you are doing?
<div class="html5fileupload demo_multi" data-multiple="true" data-url="html5fileupload.php?userid=<?echo">id";?>" style="width: 100%;">
<input type="file" name="file" />
</div>
<script>
$('.html5fileupload.demo_multi').html5fileupload();
</script>
and html5fileupload,php im adding $id=&_GET[id]; and my code to connect to DataBase.
whit this code i can storage every file whit a name and id in my database.
the problem is when i try to send de id whit the follow code:
<div class="html5fileupload demo_multi" data-multiple="true" data-url="html5fileupload.php" style="width: 100%;">
<input type="file" name="file" />
</div>
<script>
$('.html5fileupload.demo_multi').html5fileupload({ data: { userid : 1 }
});
</script>
and html5fileupload,php is your original code after the:
<?php
if (!empty($_POST)) {
all the code here
.
.
.
fwrite($handle, $file);
fclose($handle);
/*im just adding this line...*/
$id_post=$_POST['userid'];
/*and them the DataBase connect...*/
...all the original code here
But in the DataBase the value for id is taking a 0, not the 1.
hi, i dont know why the second solution isn’t working, but if the first one does work, use that. i will look into my code if there is something wrong.
the second solution is working for you? do you use it?
Yes it works for me, i have changed the demo pages and i see the userId with the _POST variables
i have to download the demo again or can you send the code?
$(’.dropzone’).html5imageupload({data: {userId: 100}});
is what i have for javascript and in the PHP i use
$_POST[‘userId’]
dropzone? and this is for multi upload’?
are you kidding me?
i am sorry, you are talking about the file uploader, not the image uploader, let me check that for you.
Try $_POST‘data’ in the PHP the JS is $(’.html5fileupload’).html5fileupload({data: {userId: 100}});
2 days for that? come on dude this is Discussion on HTML5 File Upload, the data: {} dosnt work…. and i dont want to use the GET method for security
DUDE, i am trying to help you, i have this working, dont complain on the FREE help i am giving you, and responding quickly. I offered to take a look at your code on your server, you refused. This is the best i can do, i have it working. Don’t call me dude and don’t complain if you can’t get it working, it works on my server.
$_POST['data']['userId']
ok im uplodaing the code on the server is the same code i type here…
Dont be mad, it was a friendly “dude”... and a good solution. Now is working. Ty for the support !
Good, excellent to hear! Have a nice day and enjoy the plugin!
Hi,
Is there a way to change the text: “Drop your file(s) here or click to add one!”? Perhaps making it smaller.
Great design and script, saved me a lot of work since I have never written a multi upload script before. So this was a great introduction,
Yes you can change that via the CSS file. change the font-size on the .dropzone class.
and on the :after and :before class
Hi, This is a great script ! I had it working in minutes…Customization is fairly simple just need to read your instruction thoroughly. Thanks I am very happy with this. Rgdshttp://dmypbau5frl9g.cloudfront.net/assets/smileys/grin-c29983cad3eb5d4695a54e4882b636dc.png
Thanks!
Hi stbeets, I have integrated your html5upload.js with Laravel 4, but i’ve found an error when i load the file from server as URL. Inside addFile method there is this condition:
} else if (!empty(options.validMime) && !file.type.match(options.validMime)) {
That returns Uncaught TypeError: Cannot read property ‘match’ of null
I’ve replaced it with} else if (!empty(options.validMime) && file.type ? !file.type.match(options.validMime) : false) {
I hope this can help!
Can you provide an url so i can have a look what might be the problem?
On the html5upload.js there is this line of code:
regexp: /[\\/:\*\?”<>\|]+$/,
However, the quotation (“) after the question mark (?) is throwing off the rest of the script, causing the rest of the script not to work as if it is looking for another quotation to close the line.
If I delete the quotation, the rest of the code shows up just fine, but then I have an error somewhere within the entire script.
Can you please assist? Thanks.
Never mind The regexp: needs to have opening and closing single quotes. Example:
'/[\\/:\*\?”<>\|]+$/';
i will look in to this, thanks for the feedback
Hi pre-purchase question: Will I be able to use this script with a pre-existing form to insert file into server folder and form information into database?
Hi,
Yes this is possible. You can use the FORM example from the docs and copy the form.php code to your script to let the image save on your server.
Is there a way to turn off the “download button” after an upload. I am using this in a very dynamic setup where I encrypt the files on the server side, so downloading is not even an option at this point.
Also noticed that the max size is a bit off as it list the file size of the uploaded file slightly larger than it is.
hi, yes this is possible, with the data-button-delete = false option set, the download button will not appear.
I will look into the filesize, thanks for the feedback!
i would like to purchase this script i just have 2 questions i need the answer of first so please let me know asap;
1) can we have a text field called name and inside the upload folder included in the pathway the system will upload the multiple files into a newly created folder thats named what was written into the name field so e.g /uploads/name/files.jpg
2. is the problem of a user doing this via a phone or ipad resolved?
do let me know so i can take this forward
thank you
Hi Jonathan24,
1) you can add a data object with every ajax call, so you can push the value of your input with the call and in the PHP backend you can change the upload dir to what ever fits your need (so you can use your variable name) 2) yes there are currently no known issues
gr. Sander
Hi,
How can we use img tag instead of passing comma separated as we want to add attribute for dragging contain images like below link.
http://www.w3schools.com/jsref/event_ondragstart.aspPlease reply us asap how to resolve that.
hi, this is not possible, only a comma separated string is possible. Gr. Sander
Hi,
Looks realy great! It is also possible to show the images on the server with “data-file” as a image instead of only the filename?
Thank you!
Regards Caroline
Hi Caroline, Do you mean you want a image preview of the data-file files? I am working on that at the moment, hopefully and of the week i will post an update.
Yes, that is what I need
Thank you.. I will check the end of the week.
Helemaal goed, ik houd je op de hoogte 
Toppie 
hoi Caroline, de update is akkoord, dus vanaf nu ook een preview met de server bestanden!
Super! Ik heb hem zojuist gekocht
THNX
Werkt super! Alleen nog 1 klein dingetje wat ik niet voor elkaar krijg.
Is het mogelijk om na het uploaden van nieuwe bestanden (1 of meerdere) deze gelijk te laten zien zoals de reeds bestaande ook via data-file= getoond worden? Of kan ik hier een andere actie aan koppelen? Ik heb geprobeerd om een l ocation.reload(); bij de actie “onAfterStartSuccess” te doen, maar bij meerdere uploads, doet hij de reload al na de eerste die klaar is.
Alvast bedankt!
hoi, het is helaas nog niet mogelijk om de bestanden hetzelfde te laten staan na een upload… Een reload na alle transacties zit er ook nog niet in. Maar je geeft me genoeg stof tot nadenken, ik zal komende week weer een update maken. Sorry voor het ongemak.
Haha…geeft niet dat het er nog niet in zit..maar als je het er in wil maken heel graag. Ik zie het wel verschijnen. Het heeft geen haast
THANX weer!
demo url kaspersky alert: dangerous URL
Hi, this is because Kaspersky is trying to download the JS on its own, that is not allowed because the request is filtered via a PHP script. Kaspersky is getting redirected.
We are using existing files and we have provided comman seprated data and it is showing only name of file instead of image. How to show image ? also icon is showing very smaller.
Hi, do you have an url so i can see what you mean? You can mail me at info[at]stbeets.nl
I email you 3 days ago. but no reply. will you please reply ?
will you please reply to my email? I emailed you from tarikjay[ at ] yahoo.com
i will look at tonight, sorry for late response
May i know how to we can check the file exist or not, Can we have testing file for 1-2 days so that we can purchase this module. Please reply asap
Hi, there is no possibility to check if the file exists with javascript. And there is at this moment no callback to check if a file alreasy exists.
Also i cannot provide a testing file, it’s only 11 dollars.
I tried renaming the file based on the user id before it is uploaded without success. Instead, I am renaming it after the upload but I need to pass along the user id. How do we send custom data on upload?
I tried this but the data object isn’t being posted:
$(".html5fileupload.demo_basic").html5fileupload({
data: { userid : 1 }
});
i will upload a new version, something is wrong atm with data: {userid: 1}, please provide email so i can mail you the new version before it get approved
No rush, I’ll wait for the update. I solved temporarily with a less secure method using $_GET in html5fileupload.php. I just add it to the url like this data-url=”html5fileupload.php?userid=1” and then verify again in that file that the userid being passed is valid.
update posted, soon it will be fixed