Re: 1st Comparison inside [fileinfo] broken. = bug?

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 59956
interpreted = N
texte = Thank you Brian! you discovered the pattern that I still had not nailed down in its full picture. I just hope that pattern holds so my workaround doesn't break someday. -John On Tue, 9 Nov 2004 13:59:15 -0800 Brian Fries wrote: >This does look like a bug, or at least an interesting >programming choice by SMSI... > >If the path for the [fileinfo] points at a valid JPG or >GIF file, [imageheight] shows the pixel height. > >If the path points to a non-existent file, [imageheight] >is blank. > >If the path points to a file that is not a JPG or GIF >file, then the first time you look at [imageheight] it >says: > >Error: Invalid image extension (file path) > >The second and subsequent times you look at [imageheight] >for a non-image file, it comes up blank. > >- Brian > > >On Nov 9, 2004, at 8:59 AM, >wrote: > >> [!]=== Someone PLEASE try this, I think it is a WebDNA >>bug! ==== >> >> "test.tpl" is reached by this form: >>
>enctype="multipart/form-data"> >> >> >> >> >> Before trying it - change the values of 'MyPhotoDir' & >>'theFilename' >> on the top lines of code from "xxxxx" to values which >>points to a real >> file on your server which is not a .gif or .jpg, or is >>one of those >> but named with the other extension. >> >> ===[/!] >> >> ----------------- test.tpl ---------------- >> [text show=F]MyPhotoDir=xxxxx[/text] >> [text show=F]theFilename=xxxxx[/text] >> >> [formvariables] >> [showif [url][name][/url]^[url]"ShowStep"[/url]] >> [text]ShowStep=[value][/text] >> [/showif] >> [!]...plus more stuff to grab the value for >>'thefile'[/!] >> [/formvariables] >> >> [showif [URL][ShowStep][/URL]=4] >> >> [!]...plus more stuff to write the uploaded file to disk >>- all working >> fine.[/!] >> [!]But now to error check what was uploaded - where the >>problem is.[/!] >> >> [FileInfo file=[MyPhotoDir]/[theFilename]] >> [text show=F]UpldFileStatus=unknown[/text] >> [text show=F]ErrorMessg=[/text] >>  >> [showif [URL][ImageHeight][/URL]=] >> [text >>show=F]UpldFileStatus=[UpldFileStatus],NeverFires[/text] >> [text show=F]ErrorMessg=[ErrorMessg] -blah?, why >>not?
[/text] >> [/showif] >> [showif [URL][ImageHeight][/URL]=] >> [text show=F]UpldFileStatus=[UpldFileStatus],Is >>it[/text] >> [text show=F]ErrorMessg=[ErrorMessg] -blahA[/text] >> [/showif] >> [showif [URL][ImageHeight][/URL]=] >> [text show=F]UpldFileStatus=[UpldFileStatus],a WebDNA >> 6.0/MacOSX.2.8[/text] >> [text show=F]ErrorMessg=[ErrorMessg] -blahB[/text] >> [/showif] >> [showif [URL][ImageHeight][/URL]=] >> [text >>show=F]UpldFileStatus=[UpldFileStatus],bug?[/text] >> [text show=F]ErrorMessg=[ErrorMessg] -blah-C[/text] >> [/showif] >> UpldFileStatus=[UpldFileStatus]
>> Error=[ErrorMessg] >> [/FileInfo] >> >> [/showif] >> ----------------- /test.tpl ---------------- >> -John ------------------------------------------------------------- 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: 1st Comparison inside [fileinfo] broken. = bug? ( 2004)
  2. Re: 1st Comparison inside [fileinfo] broken. = bug? ( Brian Fries 2004)
  3. 1st Comparison inside [fileinfo] broken. = bug? ( 2004)
Thank you Brian! you discovered the pattern that I still had not nailed down in its full picture. I just hope that pattern holds so my workaround doesn't break someday. -John On Tue, 9 Nov 2004 13:59:15 -0800 Brian Fries wrote: >This does look like a bug, or at least an interesting >programming choice by SMSI... > >If the path for the [fileinfo] points at a valid JPG or >GIF file, [imageheight] shows the pixel height. > >If the path points to a non-existent file, [imageheight] >is blank. > >If the path points to a file that is not a JPG or GIF >file, then the first time you look at [imageheight] it >says: > >Error: Invalid image extension (file path) > >The second and subsequent times you look at [imageheight] >for a non-image file, it comes up blank. > >- Brian > > >On Nov 9, 2004, at 8:59 AM, >wrote: > >> [!]=== Someone PLEASE try this, I think it is a WebDNA >>bug! ==== >> >> "test.tpl" is reached by this form: >> >enctype="multipart/form-data"> >> >> >> >> >> Before trying it - change the values of 'MyPhotoDir' & >>'theFilename' >> on the top lines of code from "xxxxx" to values which >>points to a real >> file on your server which is not a .gif or .jpg, or is >>one of those >> but named with the other extension. >> >> ===[/!] >> >> ----------------- test.tpl ---------------- >> [text show=F]MyPhotoDir=xxxxx[/text] >> [text show=F]theFilename=xxxxx[/text] >> >> [formvariables] >> [showif [url][name][/url]^[url]"ShowStep"[/url]] >> [text]ShowStep=[value][/text] >> [/showif] >> [!]...plus more stuff to grab the value for >>'thefile'[/!] >> [/formvariables] >> >> [showif [url][ShowStep][/URL]=4] >> >> [!]...plus more stuff to write the uploaded file to disk >>- all working >> fine.[/!] >> [!]But now to error check what was uploaded - where the >>problem is.[/!] >> >> [FileInfo file=[MyPhotoDir]/[theFilename]] >> [text show=F]UpldFileStatus=unknown[/text] >> [text show=F]ErrorMessg=[/text] >>  >> [showif [url][ImageHeight][/URL]=] >> [text >>show=F]UpldFileStatus=[UpldFileStatus],NeverFires[/text] >> [text show=F]ErrorMessg=[ErrorMessg] -blah?, why >>not?
[/text] >> [/showif] >> [showif [url][ImageHeight][/URL]=] >> [text show=F]UpldFileStatus=[UpldFileStatus],Is >>it[/text] >> [text show=F]ErrorMessg=[ErrorMessg] -blahA[/text] >> [/showif] >> [showif [url][ImageHeight][/URL]=] >> [text show=F]UpldFileStatus=[UpldFileStatus],a WebDNA >> 6.0/MacOSX.2.8[/text] >> [text show=F]ErrorMessg=[ErrorMessg] -blahB[/text] >> [/showif] >> [showif [url][ImageHeight][/URL]=] >> [text >>show=F]UpldFileStatus=[UpldFileStatus],bug?[/text] >> [text show=F]ErrorMessg=[ErrorMessg] -blah-C[/text] >> [/showif] >> UpldFileStatus=[UpldFileStatus]
>> Error=[ErrorMessg] >> [/FileInfo] >> >> [/showif] >> ----------------- /test.tpl ---------------- >> -John ------------------------------------------------------------- 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/

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:

Zipcodes (1998) Emailer [cart] file names (1997) The code, one more time. (2003) need to delete a database remotely (2000) WebMerchant crashing and other WebMerchant problem (2000) Bug Report, maybe (1997) HideIf ip= OR ip= (1998) if/then/else in founditems (2001) my price won't move (1997) Help Encrypt/Decrypt eMail (2003) LookUp (2001) I'm new be kind (1997) [Sum] function? (1997) Uploading a new database (2001) [WebDNA] [hideif]'s not working in [sendmail] (2008) WebCat2b13MacPlugIn - more [date] problems (1997) [WebDNA] Should I be able to use [setmimeheader name=Content-Type ? (2018) WebCatalog2 Feature Feedback (1996) Add a field to the error log? (1997) [delete] problem (1997)