Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

$(form).serialize() Workaround for File Fields

As we all know, .serialize() and .serializeArray() conveniently misses file fields (also `hidden fields).

But, Is there a work around from which I could get the value of the file field from .serialize()?

P.S: I just intend to get the value, not upload the file.(Of Course, Uploading file would be better if it is possible, but I dont think JS is capable of such action)

like image 625
Starx Avatar asked Apr 01 '11 12:04

Starx


1 Answers

You may checkout the jquery form plugin which supports file uploads as well.

like image 170
Darin Dimitrov Avatar answered Nov 04 '22 02:11

Darin Dimitrov