automated multiple upload

Hi folks,
with HTML-element <input name='my_file' type='file' size='50' accept='text/*'> I could give the user the ability to upload a file -the security-things I know and also I’m using getimagesize and my script is handling the mimetype.

So far so good. But the user only could upload one file per <input type='file'... Is there an easy way that the user could tell the script exactly the folder, where it should search for its needed files and it then automatically uploads every file (of the given mimetype)?

To say it clearly: I don’t ask for the Syntax but for the Semantic.

Well, MTh, you can have multiple 's in a list on the HTML file. And, then, in the PHP code,
you can tell it to upload all of the files one after another. The server is in control of what is done with the
files once it is uploaded to the server. If you want fancy downloads with multiple files and resuming, you
need to install a plugin that handles it.

If you want a nice “widget” plugin that works nice. I came across one a couple years ago that I played with
and it seems to work well. Here is a link to the site. It’s free…
https://blueimp.github.io/jQuery-File-Upload/

Good luck…

I believe that github project is what I based my multiload drag and drop script off of.

Astonecipher, not sure if it is what he is looking for, but, it worked for me for one site I helped with.
And, it is a nice idea to add drag-n-drop to a site… Not good for all sites, but, fun for others!
Maybe you should put that into a tutorial here… ?

More like code snippets!

You should check out DropzoneJS, it has drag and drop, click to upload and fallback to a native form upload field if the browser doesn’t support fancy stuff :slight_smile:
http://www.dropzonejs.com/

That one looks interesting, too. Thanks JimL… I liked the other one because it has a nice progress bar
system. This DropZoneJS one has easy code from the looks of it and makes a nice drop zone area in a
very simple way. I like that. Will have to play with it some!

Thx very much guys. The DropzoneJS looks very good. But I’m wondering how I can intigrate it in my project? There’s written

[code]The typical way of using dropzone is by creating a form element with the class dropzone:

[/code] [b]That’s it.[/b] But it is [u]NOT[/u]! If I write [code] [/code] (or just add [i]class="dropzone" id="my-awesome-dropzone"[/i] to my existing [i]<form ...[/i] -tag there is nothing different on my Page?!?

But I think that’s because of my poor knowhow in CSS. So thanks a lot for now and the exact implementation I have to figure out myself.

of course I “installed” it with

You need to add the css files as well to achieve the look.

Oh yes, you’re right. And also I need to create a folder uploads in my DOCUMENTROOT.

But do you know, how I could integrate it in my existing project? Meaning I’ve still got a form with (text-)inputfields, dropdownlists and checkboxes and handling the POST-data with PHP.
Now I want additionally provide the user an area for uplading locally files. That is working now, but not perfectly: There is shown one single area where the User can click and select locally files for uploading. But then all selected files shown as thumbnails and a transparent cross on them and in the folder uploads is nothing!?? And how could I schrink this single area to … e.g: a fieldset?

If that all is described in the tuts you don’t have to teach me personally -I would invest the time in reading them, thanks for your help.

Sponsor our Newsletter | Privacy Policy | Terms of Service