[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] A couple of file uploading questions...


On Wed, 26 Feb 2003 suppressed wrote:

> To get around this, after a successful file upload, I've added a CGI
> parameter with the same name as the uploaded file field, but with '.upld'
> appended; the value is the uploaded file name.  This gets appended to the
> display of the form's filefield, so the user knows that the file has been
> successfully uploaded.  My form validation method checks for the .upld
> field, and if it matches a file uploaded to the server, it accepts an
> otherwise empty file upload field.

I'm interested in knowing more about the details of this solution.
I'm thinking of a case where if the form is successfully validated, it
gets inserted or updated in a database. If it doesn't validate, I don't
care about the attachments. How do you handle making sure the file names
you choose don't collide, as well as deleting old attachment files for
forms that were never completely validated and submitted? Using a cron
script comes to mind.

I think this makes for a much nicer UI then simply detaching the files
that may have been uploaded. Any tips on making this easier to implement
would be appreciated.

	Mark

 --
 . . . . . . . . . . . . . . . . . . . . . . . . . . .
   Mark Stosberg            Principal Developer
   suppressed     Summersault, LLC
   765-939-9301 ext 202     database driven websites
 . . . . . http://www.summersault.com/ . . . . . . . .

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.