|
Posted by Jukka K. Korpela on 06/09/06 21:28
Yohan N. Leder <ynleder@nspark.org> scripsit:
> In my concrete case, user submitted a form containing a file field,
> for preview. This preview is just on browser, nothing is kept on
> server disk. So, from this preview, user can submit for real or be
> back to edit and change his input.
I'm afraid I have bad news. Internet Explorer 7 beta does not let you do
such things. For security reasons, they say, the filename is not even
available to (client-side scripting in) the browser, still less sent to the
server. Unless you can persuade them to change this (I tried a little, in
the microsoft.* newsgroup for IE discussions, in vain), you and many other
people will have to find out something different.
> Actuallu, he has to browse and
> select a new time the file to upload, everytime he go back from
> preview, even if the field he wants to change is not the file one.
Wouldn't the solution be to store the data (contents of the file) on the
server and insert an identifier for it into the form sent back to the user?
The robust way of retaining user input is that the form handler sends a
response page that contains the user input as prefilled values of fields.
For a file, you would have to play with indirection, i.e. an identifier such
as a generated file name (on the server).
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Navigation:
[Reply to this message]
|