Super Simple AJAX File Upload

Super Simple AJAX File Upload

optikalefx

11 лет назад

56,546 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@erkan1525
@erkan1525 - 03.02.2019 20:59

Aradan tam 6 yıl geçmiş ama hala mükemmel ve modern ve ultra kısa bir kod. Thank you...

Ответить
@augustineudeh1584
@augustineudeh1584 - 05.12.2018 06:30

thanks man .. i wish you long life... that was great... dope

Ответить
@lesslostpodcast
@lesslostpodcast - 09.12.2017 21:15

thanks so much

Ответить
@MrMrtydn
@MrMrtydn - 19.10.2017 14:12

you are king! thanks

Ответить
@naukarikikhabar
@naukarikikhabar - 01.09.2017 17:17

tHANK you so much.. i had already wasted my whole day in implementing file upload plugin.but this worked in single attempt..

Ответить
@p10shinde
@p10shinde - 31.01.2017 07:34

need help urgent...how can i extract 'data' and 'file' at server side in java (servlet)...? I am able to get file using ServletInputStream sis = request.getInputStream();

Ответить
@michaeltaylor4817
@michaeltaylor4817 - 19.12.2016 16:13

very useful, thank

Ответить
@victorfranco912
@victorfranco912 - 24.09.2016 20:57

thanks, men!

Ответить
@DVineMe
@DVineMe - 18.09.2016 18:21

How about uploading multiple files with one input? $_FILES only containts the last one in the selection. How can I send the total array of files?

Ответить
@umarbabajidda9664
@umarbabajidda9664 - 12.07.2016 08:15

Hey Alex. Is there anyway I can check for compatibility on different browsers, kind of like to tell the user "your browser does not support this, please upgrade to newer version" or something like that.

Ответить
@MichaelHuangB
@MichaelHuangB - 14.03.2016 08:28

Dude this is awesome!

Ответить
@andyresta1452
@andyresta1452 - 27.10.2015 16:25

Waaaw... cool men..

Ответить
@AlexandrSargsyan
@AlexandrSargsyan - 01.10.2015 10:28

upload is not a function Error

Ответить
@ManMadeToons
@ManMadeToons - 31.08.2015 22:40

Thanks really appreciate this, how did you learn to do this???

Ответить
@abdullahhaider
@abdullahhaider - 19.08.2015 20:02

what editor are you using?

Ответить
@monkeycoder9569
@monkeycoder9569 - 13.08.2015 10:38

thanks for the tutorial bro, it worked for me.
but how do i get the tmp_name from the array?

Ответить
@alshezawi2010
@alshezawi2010 - 28.07.2015 10:56

you are awesome

Ответить
@mikail0008
@mikail0008 - 06.07.2015 19:50

I have been looking for ajax upload on the net and I think this is the best solution out there, Tanks bro

Ответить
@oussemaoz6298
@oussemaoz6298 - 10.06.2015 06:00

this seems to work but i cant figure out where is the file uploaded to ? help please

Ответить
@arronhultquist2435
@arronhultquist2435 - 14.05.2015 10:21

I am using notepad ++ for the editor, I didn't know if that was important. I didn't get any errors. It did nothing. Just sat there. How do I know if my browser is xhr2 complaint? Also, where will the temp files go? I suppose you would use the php file to redirect. Correct?

As far as the IMAP functions, you show how to attach files to emails but you don't show us how to get them out. Would the attachment be an HTML inline attachment, or other. Using imap_fetchstructure I get type 1 ie multipart/alternative.

Ответить
@arronhultquist2435
@arronhultquist2435 - 11.05.2015 09:10

BTW... You would know how to work with imap functions would you? That is another this I am looking for and no one has any vids on that.

Ответить
@nidasahar
@nidasahar - 01.03.2015 13:34

How would you do the same with php ?>

Ответить
@davidkooi1172
@davidkooi1172 - 19.02.2015 01:34

Thank you!!

Ответить
@umarbabajidda9664
@umarbabajidda9664 - 24.01.2015 11:33

Erm..for how long has xhr3 been in existence. WHY DIDNT NOBODY TELL ME ABOUT THIS BEFORE!

Ответить
@nikajavakhishvili158
@nikajavakhishvili158 - 19.01.2015 14:51

Hi, what should i do if i want to send for example text inputs on the same  click?  this plugin send only files and if you want to send simple text? 

Ответить
@FoxApo
@FoxApo - 23.11.2014 17:56

I have to thank you a lot because that's what i was exactly looking for. :)

Ответить
@user-gl3dc1fp4l
@user-gl3dc1fp4l - 23.11.2014 12:29

Fast and Simple ty

Ответить
@shanewatson6697
@shanewatson6697 - 16.11.2014 03:13

can you please have a tutorial on how to bring back a file from the server ???? please 

Ответить
@thomasolsson5990
@thomasolsson5990 - 08.11.2014 13:24

Great tutorial! Thanks for sharing :) 

Ответить
@HolaGoal
@HolaGoal - 23.10.2014 19:27

i didn't understand , is that plugin used to upload files without refreshing the page or not 

Ответить
@loewenvellpolius580
@loewenvellpolius580 - 07.09.2014 16:47

hey, where can I insert some code to store the uploaded file in a different location?

Ответить
@BahadurOad
@BahadurOad - 02.09.2014 16:49

That's the thing what i m looking for. its cool. Thanks optikalefx.

Ответить
@RaSH219
@RaSH219 - 07.08.2014 04:50

This was a great tut. but the a limitation of XHR2 is that it requires at least IE10+....

Ответить
@peace2941
@peace2941 - 24.07.2014 03:58

very nice , i hate using flash for this  , 
eaching on multiples file is Really better as you've done , but the thing to change is multiples inputs into on input Files[] 
thankx

Ответить
@TavooQiqee
@TavooQiqee - 15.06.2014 06:12

Did you really do this script? Ö

Ответить
@EljayPucan
@EljayPucan - 24.03.2014 04:44

Sir, your title "Uplaod" must be "Upload" =)
By the way, thanks for the tutorial

Ответить
@Abdullahkhan-ru9yc
@Abdullahkhan-ru9yc - 04.01.2014 19:44

that is suweeeeet !!!

Ответить
@johnteague7926
@johnteague7926 - 18.10.2013 19:45

Thanks for sharing this!! By far the simplest I've come across. Would you know how to implement this with a dynamically drawn table where each row has its own file upload button? I'm having trouble trying to bind the dynamically drawn upload button with the upload function :/

Ответить
@BryanRojasQ
@BryanRojasQ - 15.10.2013 01:18

Great man! I used jqueryForm Plugin to do that! But your solution is real clear and nice

Ответить
@optikalefx
@optikalefx - 16.09.2013 03:29

I don't use django, but I think the files are available in request.FILES

Ответить
@mouhamet7
@mouhamet7 - 13.09.2013 22:06

Hello awsome tutorial thx a lot :) But am having trouble with django backend I gave the upload fonction my url /manager/upload_video/ and I am not able to have a file cna you givie me some hints? Thx Cheers

Ответить
@optikalefx
@optikalefx - 29.08.2013 04:30

your jquery selector $("myfile") isn't selecting anything. You need a . or # in front if its a class or id. This isn't an HTML5 thing, its an XHR2 thing. check caniuse to see if the browser you're interested in supports xhr2

Ответить
@ankurrawal2101
@ankurrawal2101 - 29.08.2013 03:47

To add to my previous question , does this work only with html5 or it is applicable with normal html also ?

Ответить
@ankurrawal2101
@ankurrawal2101 - 29.08.2013 03:16

apart from the code provided in the github link I have included this alert("Did i reach here inside xhr2 - 2"); $("#upload").on("click", function() { $("myfile").upload("/addPic/", function(success){ console.log("done"); }, $("#prog")); }); In the script tag.. But the link which i am calling is not getting called .. Even the progress bar is not moving and i dont see done in my console as well

Ответить
@optikalefx
@optikalefx - 29.08.2013 01:57

This code doesn't care what backend you use. It will send the file data as you normally would with django.

Ответить
@ankurrawal2101
@ankurrawal2101 - 29.08.2013 01:56

How can i make this work with django in the backend

Ответить
@WhereTheStoryEnds
@WhereTheStoryEnds - 21.08.2013 10:58

Pure awesomeness!!

Ответить
@syntrax-og
@syntrax-og - 21.08.2013 06:25

I get error saying that: $.fn.upload is not defined :(

Ответить