Page 1 of 1

Uploading images

Posted: Tue Mar 14, 2006 3:55 pm
by carloscastro
Sorry,

When i export to html document, i am trying to retrive each image filename to upload them with ftp.
I tried usiing onsaveimage2 but i cannot retrive the filename.

I insert pictures with the insertpicture method and richview automatticaly names the pictures (Ex: image3, image4, etc...)

How can i get the name of those automatic picture names when saving to html.

I manage to retrive the path and prefix but not the image name...

Thanks for your attention,
Regards,
Carlos Castro

Posted: Wed Mar 15, 2006 8:54 pm
by Sergey Tkachenko
Do you want to save pictures using their original names, or just want to insert links to existing image files?

Posted: Fri Mar 17, 2006 11:37 am
by carloscastro
Sergey,

The question is...

I start a new document with trichview, insert some pictures in the document and then export it to html.

When i look at the exported html code, image names are like image1, image2, imageX.

what i want is to get these (image1, image2, etc..) during html export to be able to ftp images to a server...

Thanks,
Carlos Castro

Posted: Mon Mar 20, 2006 5:08 pm
by Sergey Tkachenko
You can use OnSaveImage2 event:

Code: Select all

procedure TForm1.RichViewEdit1SaveImage2(Sender: TCustomRichView;
  Graphic: TGraphic; SaveFormat: TRVSaveFormat; const Path,
  ImagePrefix: String; var ImageSaveNo: Integer; var Location: String;
  var DoDefault: Boolean);
begin
  Location := Sender.RVData.SavePicture( rvsfHTML, ImagePrefix, Path,
    ImageSaveNo, False, clWindow, Graphic);
  DoDefault := False;
  {
    THE IMAGE WAS SAVED TO Path+Location
  }
end;

Posted: Fri Mar 24, 2006 12:40 pm
by carloscastro
Ok...thats just it..

Many Thanks Sergey.