Re: Extracting a filename

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 59979
interpreted = N
texte = I'm not sure, but you may need a javascript to populate a filename field on your form. It's been a while since I've looked at upload forms. Bill -----Original Message----- From: Gary Krockover Sent: Wed, 10 Nov 2004 14:44:12 -0800 To: "WebDNA Talk" Subject: Re: Extracting a filename Thanks Sal, That's the template that I'm working with, however the value for "thename" is gathered from the user, which is what I'm hoping to do away with - instead of having the user name the file that is being uploaded, it will just take the actual filename from what was selected. I'm guessing that it can't be done, else it would of been already. Somebody prove me wrong please. :) At 04:33 PM 11/10/2004, you wrote: Maybe this code from the upload.tpl example will help.
Select the file:
Name the file:


[text]thename=[/text] [formvariables] [showif [url][name][/url]^[url]"thename"[/url]] [text]thename=[value][/text] [/showif] [/formvariables] [hideif [thename]=] Form Variables:
[formvariables] [/formvariables]
IndexName
[index]
[name]

Note that the form variables for a multipart/form-data form submission are very different from standard form variables. Since you will need access to all the raw data in the form, the "name" of the form variables includes all the mime information that is normally parsed out. Thus when you have an input field like , that is in a multipart form, the name of the form variable is something like this: -Content-Disposition: form-data; name="action"- (as opposed to -action-). The value, however, shows up as -upload-. When inside a [raw][formvariables][/raw] loop, you usually would do something like this:[raw][showif [url][name][/url]^[url]"action"[/url]][/raw]. Thus you cannot easily access a particular form variable without looping through all of them and looking for the name contained in the [raw][name][/raw] parameter.
[formvariables] [showif [url][name][/url]^[url]"theFile"[/url]] [writefile file=[thename]&secure=F][value][/writefile] [/showif] [/formvariables] see picture [/hideif] Sal D'Anna ------------------------------------------------------------- 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/ ------------------------------------------------------------- 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: Extracting a filename ( Brian Fries 2004)
  2. Re: Extracting a filename ( "Gary Krockover" 2004)
  3. Re: Extracting a filename ( Rob Marquardt 2004)
  4. Re: Extracting a filename ( "Sal D'Anna" 2004)
  5. Re: Extracting a filename ( devaulw@onebox.com 2004)
  6. Re: Extracting a filename ( "Gary Krockover" 2004)
  7. Re: Extracting a filename ( "Sal D'Anna" 2004)
  8. Extracting a filename ( "Gary Krockover" 2004)
I'm not sure, but you may need a javascript to populate a filename field on your form. It's been a while since I've looked at upload forms. Bill -----Original Message----- From: Gary Krockover Sent: Wed, 10 Nov 2004 14:44:12 -0800 To: "WebDNA Talk" Subject: Re: Extracting a filename Thanks Sal, That's the template that I'm working with, however the value for "thename" is gathered from the user, which is what I'm hoping to do away with - instead of having the user name the file that is being uploaded, it will just take the actual filename from what was selected. I'm guessing that it can't be done, else it would of been already. Somebody prove me wrong please. :) At 04:33 PM 11/10/2004, you wrote: Maybe this code from the upload.tpl example will help.
Select the file:
Name the file:


[text]thename=[/text] [formvariables] [showif [url][name][/url]^[url]"thename"[/url]] [text]thename=[value][/text] [/showif] [/formvariables] [hideif [thename]=] Form Variables:
[formvariables] [/formvariables]
IndexName
[index]
[name]

Note that the form variables for a multipart/form-data form submission are very different from standard form variables. Since you will need access to all the raw data in the form, the "name" of the form variables includes all the mime information that is normally parsed out. Thus when you have an input field like , that is in a multipart form, the name of the form variable is something like this: -Content-Disposition: form-data; name="action"- (as opposed to -action-). The value, however, shows up as -upload-. When inside a [raw][formvariables][/raw] loop, you usually would do something like this:[raw][showif [url][name][/url]^[url]"action"[/url]][/raw]. Thus you cannot easily access a particular form variable without looping through all of them and looking for the name contained in the [raw][name][/raw] parameter.
[formvariables] [showif [url][name][/url]^[url]"theFile"[/url]] [writefile file=[thename]&secure=F][value][/writefile] [/showif] [/formvariables] see picture [/hideif] Sal D'Anna ------------------------------------------------------------- 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/ ------------------------------------------------------------- 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/ devaulw@onebox.com

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:

Download URL & access on the fly ? (1997) Error: Missing c in orderfile???? (2005) [ShowIf] a either fields are blank (1998) creates folders with AS (1997) [Fwd: Rotating Banners ... (was LinkExchange)] (1997) Looping (2000) Proposed FormVariables hierarchy (2000) Redirect frame targets (1998) Corruption in images (2004) ANNC: Cool New WebCat Site!!! (Lotsa Flash) (2000) totals (1997) ErrorMessages.db suggestion (1997) WebDNA 6.0 & MAC OS X Server 10.4.10 (2007) Generating unique SKU from [cart] - Still Stumped... (1997) WebCat2b15MacPlugin - showing [math] (1997) sort problems....bug or brain fart? (1997) emailer on Windows Beta 18 (1997) For those of you not on the WebCatalog Beta... (1997) Forms Search Questions (1997) bug in [SendMail] (1997)