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:

Re:Non-technical messages ... (1997) Question about replacing words (1998) typhoon... (1997) WebCat2: multiple currency support (1997) Help name our technology! I found it (1997) taxTotal, grandTotal (1997) Search returns all, not 20 (1997) [TaxableTotal] - not working with AOL and IE (1997) Webcatalog, Webstar and Crasharama (1999) [shownext max=?] armed (1997) FRAMES and CART tags problem??!? (1999) WebCat2 beta 11 - new prefs ... (1997) product differences (1999) Protect (1997) server2003 isolation mode (2004) SMSI, please fix the StandardConversions.db (2005) [INCLUDE] Limitations (1998) Problem with ShoppingCart.tpl refresh (2000) Problems setting MIME Headers (1998) Emailer (WebCat2) (1997)