Jump to content
uniGUI Discussion Forums
Sign in to follow this  
pro_imaj

UniHtmlMemo Nesnesine Resim Ekleme

Recommended Posts

Merhaba;

 

UniHtmlMemo nesnesine resim nasıl ekleyebilirim.

 

Teşekkürler.

Share this post


Link to post
Share on other sites
Thank you very much @DelphiDeveloper. There's only one thing I need to solve.

How to add images added to the original dimensions?

 

image upload width ?  height ?

Share this post


Link to post
Share on other sites

Hi,

 

Try this, without width and height:

 

4. UniFileUpload1 -> OnCompleted:

procedure TMainForm.UniFileUpload1Completed(Sender: TObject;
  AStream: TFileStream);
var
  DestName : string;
  DestFolder : string;
begin
  DestFolder:=UniServerModule.StartPath+'UploadFolder\';
  DestName:=DestFolder+ExtractFileName(UniFileUpload1.FileName);
  CopyFile(PChar(AStream.FileName), PChar(DestName), False);
  //UniSession.AddJS(UniHTMLMemo1.JSName + '.execCmd(''InsertHTML'', ''<img width="138" height="87" src="'+ 'UploadFolder/' + UniFileUpload1.FileName +'"></img>'')');
  UniSession.AddJS(UniHTMLMemo1.JSName + '.execCmd(''InsertHTML'', ''<img src="'+ 'UploadFolder/' + UniFileUpload1.FileName +'"></img>'')');
end;

Best regards,

Share this post


Link to post
Share on other sites
It's the name I added before, but when I add a different picture, it always gets the old picture.

 

I unzipped the Debug \ UploadFolder folder and delete on and I copy these files one more time, but where?

 

C:\fakepath\2.png ?

 

9mGAPr.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×