Hi alll,
I developed a module that lets you put inside body inline images uploaded with upload module.
I'm using private download method to output the file.
My impression is that caching of the image is not done.
How could I accomplish this ???

Here is what I'm doing now; based on the file name, I determine if to print out the img tag or a link to the file.
I create filename return by using standard file functions: file_create_url($file->filepath), then I use the following themeable function to print out fillename.


function theme_inline_html($file) {
  //make a list with allowed image-tags
  $extensions = 'jpg jpeg gif png';
  $regex = '/\.('. ereg_replace(' +', '|', preg_quote($extensions)) .')$/i';
  if (preg_match($regex, $file)) {
     $html = ' <img src="/'. $file. '" class="inline"> ';
  }
  else    {
     $html = ' <a href="/'. $file . '"><img src="/misc/file.gif"></a> ';
  }
  return $html;
}

The complete module is available under CVS, if someone wants to help me.

thanks
Matteo