Re: Looking for a special Image Upload Script

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 58031
interpreted = N
texte = Welp, here it is. Verbose, but it works. -Dan Page1.html ---------------
What is this file going to be used for? Choose a File from your hard drive:
Page2.html (modified from Storebuilder code) --------------- [!]=====================================================================[/!] [!] Process forms [/!] [!]=====================================================================[/!] [formvariables name=Content-Disposition: form-data; name="file_use"&exact=T] [showif [value]=trips][Text show=f]Path=../pdfs/[/Text][/showif] [showif [value]=updates][Text show=f]Path=../pdfs/downloads_pdfs/[/Text][/showif] [showif [value]=store][Text show=f]Path=store/images/[/Text][/showif] [showif [value]=links][Text show=f]Path=../images/links_images/[/Text][/showif] [showif [value]=downloads][Text show=f]Path=../pdfs/downloads_pdfs/[/Text][/showif] [showif [value]=HTML_email][Text show=f]Path=email/images/[/Text][/showif] [/formvariables] [formvariables] [!]=====================================================================[/!] [!] Get target path info [/!] [!]=====================================================================[/!] [Text]TargetPath=[Path][/text] [!]----- Content-Disposition: form-data; name="thefile"; filename="D:\A\ProDraw\animal_001.gif" Content-Type: image/gif -----[/!] [showif [url][name][/url]^[url]"theFile"[/url]] [showif [url][name][/url]^[url]filename=""[/url]] [text]sourceSpecified=No[/text] [/showif] [hideif [url][name][/url]^[url]filename=""[/url]] [text]sourceSpecified=Yes[/text] [/hideif] [Text]temp=[Middle StartAfter=filename=][name][/Middle][/Text] [Text]SourcePathNameExt=[Middle StartAfter="&EndBefore="][temp][/Middle][/Text] [ListWords Words=[SourcePathNameExt]&Delimiters=/\] [Text]SourceNameExt=[word][/Text] [/ListWords] [text]sourceValid=No[/text] [showif [url][name][/url]^[url].gif[/url]] [text]TargetExt=gif[/text] [text]sourceValid=Yes[/text] [text]TargetNameExt=[SourceNameExt][/text] [text]TargetPathNameExt=[TargetPath][TargetNameExt][/text] [/showif] [showif [url][name][/url]^[url].jpg[/url]] [text]TargetExt=jpg[/text] [text]sourceValid=Yes[/text] [text]TargetNameExt=[SourceNameExt][/text] [text]TargetPathNameExt=[TargetPath][TargetNameExt][/text] [/showif] [showif [url][name][/url]^[url].pdf[/url]] [text]TargetExt=pdf[/text] [text]sourceValid=Yes[/text] [text]TargetNameExt=[SourceNameExt][/text] [text]TargetPathNameExt=[TargetPath][TargetNameExt][/text] [/showif] [/showif] [/formvariables] [!]=====================================================================[/!] [!] Error handling [/!] [!]=====================================================================[/!] [showif [sourceSpecified]!Yes]

Please specify the source file.

[/showif] [showif [sourceValid]!Yes] That is not a valid file type. Please choose a .PDF, .GIF or .JPG file.
Click here to go back.
[/showif] [!]=====================================================================[/!] [!] Everything is correct -- continue [/!] [!]=====================================================================[/!] [showif [sourceSpecified]=Yes] [showif [sourceValid]=Yes] [showif [TargetPathNameExt]!] [formvariables] [showif [url][name][/url]^[url]"theFile"[/url]] [writefile file=[TargetPathNameExt]&secure=F][value][/writefile] [/showif] [/formvariables] Upload successful! Click here to go back.
[/showif] [/showif] [/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. Re: Looking for a special Image Upload Script ( "Dan Strong" 2004)
  2. Re: Looking for a special Image Upload Script ( "Jesse Crofoot" 2004)
  3. Re: Looking for a special Image Upload Script ( Palle Bo Nielsen 2004)
  4. Re: Looking for a special Image Upload Script ( "Dan Strong" 2004)
  5. Re: Looking for a special Image Upload Script ( Palle Bo Nielsen 2004)
  6. Re: Looking for a special Image Upload Script ( "Dan Strong" 2004)
  7. Re: Looking for a special Image Upload Script ( Donovan Brooke 2004)
  8. Looking for a special Image Upload Script ( Palle Bo Nielsen 2004)
Welp, here it is. Verbose, but it works. -Dan Page1.html ---------------
What is this file going to be used for? Choose a File from your hard drive:
Page2.html (modified from Storebuilder code) --------------- [!]=====================================================================[/!] [!] Process forms [/!] [!]=====================================================================[/!] [formvariables name=Content-Disposition: form-data; name="file_use"&exact=T] [showif [value]=trips][Text show=f]Path=../pdfs/[/Text][/showif] [showif [value]=updates][Text show=f]Path=../pdfs/downloads_pdfs/[/Text][/showif] [showif [value]=store][Text show=f]Path=store/images/[/Text][/showif] [showif [value]=links][Text show=f]Path=../images/links_images/[/Text][/showif] [showif [value]=downloads][Text show=f]Path=../pdfs/downloads_pdfs/[/Text][/showif] [showif [value]=HTML_email][Text show=f]Path=email/images/[/Text][/showif] [/formvariables] [formvariables] [!]=====================================================================[/!] [!] Get target path info [/!] [!]=====================================================================[/!] [text]TargetPath=[Path][/text] [!]----- Content-Disposition: form-data; name="thefile"; filename="D:\A\ProDraw\animal_001.gif" Content-Type: image/gif -----[/!] [showif [url][name][/url]^[url]"theFile"[/url]] [showif [url][name][/url]^[url]filename=""[/url]] [text]sourceSpecified=No[/text] [/showif] [hideif [url][name][/url]^[url]filename=""[/url]] [text]sourceSpecified=Yes[/text] [/hideif] [text]temp=[Middle StartAfter=filename=][name][/Middle][/Text] [text]SourcePathNameExt=[Middle StartAfter="&EndBefore="][temp][/Middle][/Text] [ListWords Words=[SourcePathNameExt]&Delimiters=/\] [text]SourceNameExt=[word][/Text] [/ListWords] [text]sourceValid=No[/text] [showif [url][name][/url]^[url].gif[/url]] [text]TargetExt=gif[/text] [text]sourceValid=Yes[/text] [text]TargetNameExt=[SourceNameExt][/text] [text]TargetPathNameExt=[TargetPath][TargetNameExt][/text] [/showif] [showif [url][name][/url]^[url].jpg[/url]] [text]TargetExt=jpg[/text] [text]sourceValid=Yes[/text] [text]TargetNameExt=[SourceNameExt][/text] [text]TargetPathNameExt=[TargetPath][TargetNameExt][/text] [/showif] [showif [url][name][/url]^[url].pdf[/url]] [text]TargetExt=pdf[/text] [text]sourceValid=Yes[/text] [text]TargetNameExt=[SourceNameExt][/text] [text]TargetPathNameExt=[TargetPath][TargetNameExt][/text] [/showif] [/showif] [/formvariables] [!]=====================================================================[/!] [!] Error handling [/!] [!]=====================================================================[/!] [showif [sourceSpecified]!Yes]

Please specify the source file.

[/showif] [showif [sourceValid]!Yes] That is not a valid file type. Please choose a .PDF, .GIF or .JPG file.
Click here to go back.
[/showif] [!]=====================================================================[/!] [!] Everything is correct -- continue [/!] [!]=====================================================================[/!] [showif [sourceSpecified]=Yes] [showif [sourceValid]=Yes] [showif [TargetPathNameExt]!] [formvariables] [showif [url][name][/url]^[url]"theFile"[/url]] [writefile file=[TargetPathNameExt]&secure=F][value][/writefile] [/showif] [/formvariables] Upload successful! Click here to go back.
[/showif] [/showif] [/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/ "Dan Strong"

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:

cart ID (1998) paymethod=cc allows all zeros (1999) I'm tired of all this! (2000) Email notification to one of multiple vendors ? (1997) Time to opensource? (2006) Mac: [ListFiles] bug alert (1997) select multiple 2 more cents (1997) Still Stumped on ShowNext...HELP! (1997) Site Test Please (2005) Server crashes and triggers . . . are they linked? (2001) [MATH] and Dates (1998) cc auth with [purchase] (1998) Large database on Mac OS X Server (2000) anyone interested in doing an open-source WebCat basedforum? (2002) Cart dilemma (2003) Review comparison by PC Magazine: Open for On-line Business (1997) Enhancement Request for WebCatalog-NT (1996) For those of you not on the WebCatalog Beta... (1997) Integration with SQL (1997) ShowIf inside formulas (1997)