Cleaner File Upload

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 58576
interpreted = N
texte = Copying this to the list in case anyone needs it. File upload that extract the upload file name from the form variables using grep & middle. The upload template from the dev. site requires users to choose a file and then to name it. That seemed confusing to me so I did this version. Here's the snippet: ----------------------------------------
Select the file:


Push "Upload" once & wait for confirmation.


[showif [referrer]^upload.tpl][formvariables][showif [url][name][/url]^[url]"theFile"[/url]] [text show=F]ulName=[grep search="&replace=][middle startafter=filename%3D&endbefore=%0D%0AContent-Type][name][/middle][/ grep][/text]
Succesfully uploaded "[ulName]"
[writefile file=[ulName]&secure=F][value][/writefile] [/showif][/formvariables][/showif] ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Cleaner File Upload ( Patrick McCormick 2004)
Copying this to the list in case anyone needs it. File upload that extract the upload file name from the form variables using grep & middle. The upload template from the dev. site requires users to choose a file and then to name it. That seemed confusing to me so I did this version. Here's the snippet: ----------------------------------------
Select the file:


Push "Upload" once & wait for confirmation.


[showif [referrer]^upload.tpl][formvariables][showif [url][name][/url]^[url]"theFile"[/url]] [text show=F]ulName=[grep search="&replace=][middle startafter=filename%3D&endbefore=%0D%0AContent-Type][name][/middle][/ grep][/text]
Succesfully uploaded "[ulName]"
[writefile file=[ulName]&secure=F][value][/writefile] [/showif][/formvariables][/showif] ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Patrick McCormick

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

WebCatalog 2.0.1 NT beta 1 released (1997) [WebDNA] timestamp conversion (2011) NewCart+Search with one click ? (1997) test mail (2004) Help! WebCat2 bug (1997) authenticating a second user (1997) Protect vs Authenicate (1997) Search/sort in URL Was: GuestBook example (1997) ListCookies command? (2007) Occasional crashes with $remove (1997) Emailer again & again (1997) Search Folder? (1998) Image editing in browser (2005) RE: [WebDNA] [OT] Phone solution for multiple companies at same location (2010) New Calendar Snippet (1998) WCS Newbie question (1997) Formulas.db not working (2006) Spaces in sendmail (1998) adding a unique value to each record in an existing andlive db (2002) Suffix Mapping (1997)