Tip 3 - How to Detect folders in Safari with html5 - ahmadhassan

in education •  7 years ago 

HTML 5 Tip 3 - How to Detect folders in Safari

1.jpg


Today i am going to show how to Detect folders in Safari in html with simple code. I hope you will understand this.
If you have any query you can ask.
i hope you will like it.


Array.prototype.forEach.call(e.dataTransfer.files, function (file) {
   var r = new FileReader();
   r.onload = function (event) {
      addFile(file);
   };
   r.onerror = function (event) {
      alert("Uploading folders isn't supported in Safari browser!");
   }
   r.readAsDataURL(file);
});


Follow me at : https://steemit.com/@ahmadhassan
=========================================================


Thanks for reading and always welcome your suggestions :) =========================================================

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

It was a useful post

thanks