in reply to Re: Re: Previewing With Local Image Links
in thread Previewing With Local Image Links

Mea Culpa.

After actually reading the CGI.pm perldoc I discovered that I was wrong. But only partially wrong. The documentation also mentions that not all browsers send the whole path; some send only the file name. So you can't rely on the path that gets submitted to preview images anyway (well, not in a browser-independent way, that is).

Cheers,
-- moodster

  • Comment on Re: Re: Re: Previewing With Local Image Links

Replies are listed 'Best First'.
Re: Re: Re: Re: Previewing With Local Image Links
by Cody Pendant (Prior) on Feb 05, 2002 at 01:07 UTC
    Actually you're right about the file name/path problem. Mac browsers seem only to have the filename, and I don't know how that works, come to think of it.

    Plus, as Mac file paths and names are quite happy to have slashes in them, any script that strips out everything up to the last slash is going to cause errors. Anyone want to look in CGI.pm to see how it does this?

    I've got an idea, how about this:

    • you have your content management system include a frame, to which your users can drag the image in question.
    • Now JavaScript knows the current URL of that frame,
    • You do some kind of smart JavaScript submit to your perl script that will include that URL.
    Happy to help with the JavaScript.

    --

    ($_=
    
    
    '      jjjjjjuuuuuuuuusssssssssttttttttt
           annnnnnoootttttthhhhheeeeeerrrrrr
           pppeeeerrrrrrrrrrrrllllllllllllll
           haaaaccccccckkkkkkkeeeeeeeerrrrrr
    '      )
    
    =~y
           /[a-z]//s
           ;print;