<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    I'm writing an image gallery recipe.<br>
    <br>
    Part of what it does is reads an existing wiki pages and isolates
    any lines that contain "Attach:".<br>
    <br>
    Once the lines are isolated, it extracts the file name by taking
    everything after Attach: but before .jpg to determine the path of
    the file.<br>
    <br>
    <b>The problem </b>is that if a user has changed the default value
    of $UploadPrefixFmt to use slashes instead of dots (for example), or
    the user has enabled Per Page attachments instead of Group
    attachments, the script breaks.<br>
    <br>
    I need a way to determine the upload path (or URL) to the image when
    given nothing more than what is on the wiki page (Eg.  Attach:
    Group/Name/File.jpg)<br>
    <br>
    Another problem which I foresee happening is what if a user specifed
    Attach:File.jpg without specifying the Group or Page name where the
    image is to be stored?  That's another problem, but I haven't got to
    that bridge yet. <br>
    <br>
    I suspect I need to use the FmtPageName or some similar function,
    but I'm not really sure.<br>
    <br>
    Thanks in advance!<br>
    <br>
    S Leite<br>
  </body>
</html>