Link to home
Start Free TrialLog in
Avatar of myyis
myyis

asked on

File drag and drop

Hi everybody,

I use the below code to  upload files with a flash progress bar.
How can I manipulate my code to have a drag and drop file  (multi file!) feature using the method described at the link.
What steps you suggest me?
Thank you.

https://github.com/arian/mootools-form-upload

 
<script src="mootools.js"></script>
<script src="Fx.js"></script>
<script src="Swiff.js"></script>
<script src="FancyUpload.js"></script>

<script type="text/javascript">
window.addEvent('load', function() {
	var up = new FancyUpload.Attach('demo-list', '#demo-attach, #demo-attach-2', {
		path: 'images/Swiff.Uploader.swf',
		url: 'server/upload.php',
		fileSizeMax: 50 * 1024 * 1024,verbose: true,

		onFileSuccess: function(file) {
				file.ui.remove.set('style','display:"";visible:true');
		},
			
	});

});
</script>

<body >
<div id="demo"  >
 
<a href="#_"   id="demo-attach"    >Attach a file</a>
<ul id="demo-list"  ></ul>
<a href="#_"   id="demo-attach-2"    >Attach more</a>
</div>
</body>

Open in new window

FancyUpload.js
SOLUTION
Avatar of Randy Downs
Randy Downs
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of myyis
myyis

ASKER

Thank you all
What  I  want specifically is to change the code attached above and add a drag a drop feature.

Especially if somebody tells me the part that I should change at  the file "FancyUpload.js" I will be happy.
It is just that FancyUpload.js is very very old script... I would not recommend using it as you will probably encounter compatibility issue eventually with browsers.

And Pupload or Dropzone are so cool and easy :)
Avatar of myyis

ASKER

Well I am happy using that, so  I prefer not to change now.
Avatar of myyis

ASKER

I will try dropzone, thank you