Code

Discussion on HTML5 File Upload

Discussion on HTML5 File Upload

By
Cart 674 sales
stbeets

stbeets supports this item

Supported

186 comments found.

Hello stbeets! I already have a form in my page and i just need include the upload section. My form is in html and calls to a php file who sends the info, i wonder if your code could help me, would be easy to complement my form or how could i make it work?? If that’s so, i’ll buy it

i’m quite begginer so i appreciate the help. my form>> http://www.roble.com.mx/contacto-roble.html

Hi dulci, yes this is possible, if you see my demo, that’s a HTML page and the form demo is send to a PHP file

Ive loaded the plugin and configured it, but when I try to upload a file it finds it, seems to upload it (as evidenced by the green slider moving right) bu then it turns red, and the file is not on the server.

Any ideas?

hi, yes, i think you have error logging on in PHP, if you check the response from the ajax call (browser, hit F12 and click the network tab, you can see the response). If you have a demo url i could check it for you.

Hello there :)

This is a very good script, it helped me so much, please help me optimizing images (quality and size), how can I do this?

Thanks a lot, Have a nice day

Hi, this can be done by adding “filters” to the canvas draw function, see the faq area for demo urls http://lmgtfy.com/?q=canvas+image+quality+html5 The draw on canvas via the browser is not that great of quality, if you apply these methods, it can be improved!

Hello!

I’m trying to make the demo page work, but as I need it for files bigger than 200mb, either the progress bar will fill instantly, or the whole page will just crash.

What should I do? I’m using latest Chrome version. Page is http://sempregeek.com.br/fileupload/

Hi, i checked your demo url, but all the examples are maxed out at 2 MB?

As destroys the plugin or dynamically loads the images into data-file = ””?

hi, sorry for the late reply, could you elaborate?

The following file not work html5fileupload.php

Hi, could you elaborate what is not working?

I just purchased script form your site and trying to execute it but I am getting an error as mention below please suggest correction to make this code work..

$file) { $newname = $_POST[$inputname.’_name’]; $extension = strtolower(end(explode(’.’,$file[‘name’]))); $fname = $newname.’.’.$extension; $contents = file_get_contents($file[‘tmp_name’]); $handle = fopen($serverdir.$fname,’w’); fwrite($handle, $contents); fclose($handle); $filename[] = $fname; } ?>

Thanks

Hello i have a problem, your script dosnt delete the files can you give me support?

if thumb are displaying on correct way, why do you mention a path problem? and why you say is a php problem?

can i send you the php code?

ofcourse you can send it, no problem. But keep in mind i dont have the same setup (server settings and all) so i can only check the code, see i there is something might be the problem… my mail is sander[at]stbeets.nl

No more support here? Nice

Hi, i am sorry, what problem can i help you with. do you have a clear description and or a demo url with the problem?

delete button dosnt delete the images.

Testing it on Chrome and Firefox, no problems can be detected… do you have a demo url?

Hi Stbeets, It seems that onAfterStartAlways callback function doesn’t work properly (JS error). But it is not a problem, since I can use both onAfterStartFail and onAfterStartSuccess simultaneously for the same purpose. In a similar manner, is it possible to add callback functions after deleting a file ? Perhaps by inserting a patch somewhere into the code ? Many thanks in advance. Sincerely Tony.

Hi, add in the NON minified version, add on line 453 _self.remove($file); if (_self.options.onAfterRemoveSuccess) _self.options.onAfterRemoveSuccess.call(_self, response); } else {

Then you can use OnAfterRemoveSuccess

Hi Stbeets,
Thank you, the patch works very well when only one file is removed at a time.
Is it possible to have a similar callback function like “onAfterAllRemoveSuccess” when the AllRemove button is clicked and all files are removed at a same time ?
I tried to do it by myself, but I could not!
Regards,
Tony.

Hi Stbeets,
Sorry to recall my last question.
With OnAfterRemoveSuccess, it works when only one file is removed at a time.
Is it possible to have a similar callback function which could be called “onAfterAllRemoveSuccess”, when AllRemove button is clicked and all files are removed at a same time ?
Regards,
Tony.

Hello i need to upload the files just in one zip file, this is possible?

nope, not at this point

I name the md5 version of the id number of the contents of the scripts that i do to the picture documents. How can i name the the pictures that i will add by using this script when i have not taken the content id number from the page of adding content? (Is it proper that i name it as the previous content id number plus 1?)

If we do this somehow is it possible that your script may show the related content for regulating the picture document that is uploaded previously in order to the related id number? To regulate the picture of the related content (for example deleting and adding the new one etc.)

I have to upload the picture names as md5 (“Image”.$id). Because i have to use the database of the component of joom/k2. May i organize the pictures of the contents in order to CMS technique by using your script? Thank you.

Hi, ya you can organize it the way you want, no problem!

Hello,

I’ve been using the plugin perfectly for a while now. I’ve just amended a bit of my site. The crucial difference is that now the html5upload divs are loaded after the DOM is loaded via jQuery (dependant on the value of a select item).

Your plugin has stopped working, presumably, I think due to the elements not being there when the DOM is loaded.

Is there a way of patching this? Welcome your speedy reply.

Many thanks,

Fred

I can’t seem to get that to work? I currently have

jQuery('.html5fileupload').html5fileupload();
which is displaying the plugin, but not showing the files that I have selected in the grey box. How should your snippet of code be implemented?

Ah… I’ve solved it… You have to re call the .html5fileupload() call on the .load event as a callback!

Two examples for anyone else with a similar issue:
$(document.getElementById(the_id)).closest(".form-group").find('.entry_media_container').load( "/enter/javascripts/uploaders.php?form_item_id="+tag+"&file_types=mp3", function(){jQuery('.html5fileupload').html5fileupload();} );
or for a more simple example:
$('#target').load(url,data,function(){
      $('a[rel*=lightbox]').lightbox();
});

Cool! Enjoy the plugin!

i have hot a problem. i can multiple upload but i can’t external data post. example;

<div class="html5fileupload exampleuploadform" data-url="html5fileupload.php" data-multiple="true" style="width: 100%;">

<input type="file" name="file" /></div>
<script>
$('.exampleuploadform').html5fileupload({data:example_data:"example_value"}}); 
</script>

this example_data not posting…

this situation is very urgent

hi, it should be data:{example_data:”value”}, so don’t forget the brackets {} around the data.

Hello,

Is it possible to call “all start” from jquery directly ? The only way that I found for now is to do ”$(’.allstart’).trigger(‘click’);”

I purchased your HTML 5 File Upload script and from your documentation I read this is the correct way to delete an uploaded file:

But it doesn’t seem to be working, when I click the delete icon it just sits there. How do I go about troubleshooting this? How is this script communicating with html5fileupload.remove.php?

Any help would be greatly appreciated as I need to have this functionality for our company website.

Thanks,

Hello,

is it possible to have thumbnails based on extension like pdf, xls, ... ?

Thanks in advance before buying.

Daniel

Hi Daniel,

Not at this moment, i will put it on my todolist! Follow me for the updates

Regards,

Sander

Hello stbeets,

It is possible to send some data to the html5fileupload.php script with the option “data”. The data can be retrieved within the array $_POST[‘data’], and it works fine.
It would be useful that the data are sent similarly to the html5fileuploadremove.php scipt. But since I need this feature, it doesn’t work. There is nothing in the $_POST array but the filename. Perhaps, I’ve missed something ?
Can you help me ?


Regards
Tony.

Hi, thanks for reply. But the mod applies to html5imageupload.js, not to html5fileupload.js. How can I fix html5fileupload.js ? Sincerely

Hi, rule 448, change it to data: $.extend({ file: $file.data(‘file’) }, options.data),

Hi, many thanks, it works fine !

GREAT plugin and working well thank!!

One question: How do a stop the “preview” from automatically including the current url?

<div class="file"><div class="preview" style="background-image: url(http://www.xxx.com/admin/61/resized.jpg);" /> If I look at the code for this it just adds file.original which is correct?? But I cannot seem to see how the current url get's included? Thanks Johann</div>

You send exemples in ASP classic?

Hi, i have no ASP sample code, sorry

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey