Dynamically building a file element in a form

L

Louis

I am building a JS library (to be used in an HTML page, of course) to
get and process some data via Google Maps API. The whole result is
stored in a single JS object.
Then I want to upload them to a server page. I use an hidden form like
this:

<form id="fupload" action="upload.php" method="POST">
<input type="hidden" name="op" value="UX" />
<input type="hidden" name="data" value="" />
</form></p>

and upload data using this code:

var res = (... computed value, as JSON string ...);
var form = document.forms["fupload"];
form.elements["data"].value = res;
form.submit();

The problem is, if the "data" field is very large (> 64k byte), it is
removed by SUHOSIN tool on the server. I can't change that limit.
Instead the limit on uploaded file size is much more higher.

Now the question:
is it possible to use a '<input type="file" ...>' and assign it a
DIRECT (DYNAMICALLY built) value without use of a real file from my
file system? If yes, for what browsers?

MTIA - Louis
 
T

Thomas 'PointedEars' Lahn

Louis said:
is it possible to use a '<input type="file" ...>' and assign it a
DIRECT (DYNAMICALLY built) value without use of a real file from my
file system?

No.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top