Bug Tracker

Ticket #2656 (closed bug: invalid)

Opened 7 years ago

Last modified 3 years ago

serialize() ignores input type=file

Reported by: mingyuchang Owned by:
Priority: major Milestone: 1.2.4
Component: ajax Version: 1.2.3
Keywords: Cc:
Blocking: Blocked by:

Description

the output generated from serialize function with respect to a form doesn't include those values in the file type fileds

Change History

comment:1 Changed 6 years ago by dmethvin

  • Component changed from core to ajax
  • Summary changed from serialize function of form misses the file field to serialize() ignores input type=file

Seems like a pretty simple fix, it looks like the test for type just needs to have file added to it.

comment:2 follow-up: ↓ 5 Changed 6 years ago by brandon

  • Status changed from new to closed
  • Resolution set to invalid

The serialize method can't get the contents of the file so I don't understand why it would need to serialize the file form field. You'd have to use one of the Ajax File upload plugins to get the contents via AJAX.

comment:3 follow-up: ↓ 4 Changed 3 years ago by MrIsaacs

what is an appropriate solution for sending files via ajax?

comment:4 in reply to: ↑ 3 Changed 3 years ago by anonymous

Replying to MrIsaacs:

what is an appropriate solution for sending files via ajax?

beer

comment:5 in reply to: ↑ 2 Changed 3 years ago by adam.jimenez@…

Replying to brandon:

The serialize method can't get the contents of the file so I don't understand why it would need to serialize the file form field. You'd have to use one of the Ajax File upload plugins to get the contents via AJAX.

It's useful to get the filename for validation.

Note: See TracTickets for help on using tickets.