How do I make Opera upload files like other browsers?

Moreno

New Member
When uploading one file using \[code\]<input type="file" />\[/code\] in Opera, it works as expected. That is, you find the expected file data in $_FILES in PHP server side.However, when I try to upload several files at once using Opera, by setting \[code\]<input type="file" min="1" max="999" />\[/code\] then all the files' contents are glued together in one long string and sent as POST data. All the files in this string are separated by headers such as this:\[code\]------------94QV8HRqBwta8NY4L2WH0rContent-Disposition: form-data; name="file[]"; filename="xxx1069225496.xml"Content-Type: text/xml<?xml>...\[/code\]Opera follows the Webforms 2.0 standard, I know. But is there a simple way to make Opera send multiple files in the same fashion other browsers do, or will I have to write an interpreter to get files just from Opera?Thanks for any help. Below is the HTML I'm currently using.\[code\]<div id="filearea"> <input type="file" min="1" max="6000" accept="text/xml" name="file[]" style="padding: 1px; margin: 2px 0px;" /></div>\[/code\]This is how the var_dump of $_POST looks (I've erased any actual XML data, taking up space)\[code\]array(1) { ["file"]=> array(1) { [0]=> string(4209) "------------94QV8HRqBwta8NY4L2WH0rContent-Disposition: form-data; name="file[]"; filename="1219854274.xml"Content-Type: text/xml<?xml version="1.0"?>...------------94QV8HRqBwta8NY4L2WH0rContent-Disposition: form-data; name="file[]"; filename="xxx1069225496.xml"Content-Type: text/xml<?xml version="1.0"?>...------------94QV8HRqBwta8NY4L2WH0rContent-Disposition: form-data; name="file[]"; filename="xxx1111008062.xml"Content-Type: text/xml<?xml version="1.0"?>...------------94QV8HRqBwta8NY4L2WH0rContent-Disposition: form-data; name="file[]"; filename="1219854274.xml"Content-Type: text/xml<?xml version="1.0"?>... " }}\[/code\]
 
Back
Top