Ticket #7271 (closed bug)
Chome doesn't copy the uploaded file ref
| Reported by: | droberts@… | Owned by: | droberts@… |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.5 |
| Component: | manipulation | Version: | 1.4.2 |
| Keywords: | clone security file | Cc: | |
| Blocking: | Blocked by: |
Description
If you have an <input type="file" /> and you .clone() it after someone selects a file to upload, I would expect the ref to that file to be copied as well. This is the case in FireFox but it seems not to be copied Chrome.
Change History
comment:1 follow-up: ↓ 2 Changed 3 years ago by SlexAxton
- Keywords clone security file added
- Owner set to droberts@…
- Status changed from new to pending
- Component changed from unfiled to manipulation
comment:2 in reply to: ↑ 1 Changed 3 years ago by anonymous
Replying to SlexAxton:
I believe this is a security feature of chrome. I don't think there's anything we can do about it?
Did it work in some previous version of jQuery, or in another library?
Also please provide a jsFiddle or jsbin link to show exactly how to reproduce this.
Here's a jsbin link that shows what I mean. http://jsbin.com/opehu3/6/ Choose a file, and then hit "Copy File Input". In FireFox the copied input also has the selected file; in Chrome, it's blank.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

I believe this is a security feature of chrome. I don't think there's anything we can do about it?
Did it work in some previous version of jQuery, or in another library?
Also please provide a jsFiddle or jsbin link to show exactly how to reproduce this.