You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dan Allen <da...@mojavelinux.com> on 2003/03/09 11:53:01 UTC

[OT] form wizard with upload question

I set this to off topic since it really isn't limited to struts, but
I was interested in the advice this community could provide.

Assume I have a 4 page form which gathers user information, address
information and company information.  I would like to give the user
the opportunity to upload a logo while filling out the form.  If I
do this in the natural place, which would be in step 2, I am not
sure how to handle the case where the user will cancel the form in
step 3 if I save the logo to disk.

I am keeping the form data in a session until the wizard is
completed.  If I write the uploaded file to disk after step 2 (I
wouldn't want to keep it in the session, not even sure I can) then I
will junk up my upload directory for users who cancel the form.

One natural place to put the upload would be after the wizard is
complete and the data solidified.  Then, the upload could be
attached to the saved data.

Any thoughts/advice on how to handle this form?  The following is
the wizard

user info (login, email) ->
    company info (independent business) ->
        address info (for the company) ->
            category info (categorize the business)

It would make sense to put the upload with the company info, but the
user is not saved to disk (in the database) until the whole form is
completed.

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <da...@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Microsoft is not the answer, it is the question. 
The answer is NO!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [OT] form wizard with upload question

Posted by Dan Allen <da...@mojavelinux.com>.
> > Assume I have a 4 page form which gathers user information, address
> > information and company information.  I would like to give the user
> > the opportunity to upload a logo while filling out the form.  If I
> > do this in the natural place, which would be in step 2, I am not
> > sure how to handle the case where the user will cancel the form in
> > step 3 if I save the logo to disk.
> 
> I would try to provide the best ergonomics and therefore I'd have logo 
> upload in the second step. When uploaded, place the image in a temp. folder 
> under the <sessionId>.gif name or something like that. When the wizard 
> completes, place the uploaded image in the right place and remove it from 
> the temp. dir. Also, if you have 'cancel' button in your wizard, bind it to 
> CleanAction or something like that. Also, servlet spec 2.3 defines some 
> session listener classes which could be used to periodically check the temp 
> dir and the active sessions (no active session -- delete the file). And, of 
> course, simple cron job which deletes temp files older than X hours is a 
> must.
Fair enough.  I like the idea of the cancel button, that will
definitely keep things clean.  One thing that sucks about the web is
that users can abandon forms by killing the window and then you are
left stranded.  But crons (whether by deamon or event listeners)
will keep it tidy for now.

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <da...@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
"I am the GOD.....the GOD...of house!" 
 -- Leeloo
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [OT] form wizard with upload question

Posted by Davor Cengija <da...@mail.inet.hr>.
Dan Allen wrote:
 
> Assume I have a 4 page form which gathers user information, address
> information and company information.  I would like to give the user
> the opportunity to upload a logo while filling out the form.  If I
> do this in the natural place, which would be in step 2, I am not
> sure how to handle the case where the user will cancel the form in
> step 3 if I save the logo to disk.

I would try to provide the best ergonomics and therefore I'd have logo 
upload in the second step. When uploaded, place the image in a temp. folder 
under the <sessionId>.gif name or something like that. When the wizard 
completes, place the uploaded image in the right place and remove it from 
the temp. dir. Also, if you have 'cancel' button in your wizard, bind it to 
CleanAction or something like that. Also, servlet spec 2.3 defines some 
session listener classes which could be used to periodically check the temp 
dir and the active sessions (no active session -- delete the file). And, of 
course, simple cron job which deletes temp files older than X hours is a 
must.
-- 
davor.cengija@mail.inet.hr


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org