ibrahim71 Posted May 31, 2012 Share Posted May 31, 2012 Selamlar, Kendi yerel bilgisayarımdaki bir resmi, uzak sunucuda çalışmakta olan uygulamaya yerel browser aracılığı ile gönderip orada veritabanına kaydetmek istiyorum. Kullandığım bileşenler TOpenpictureDialog ve UniImage . I want to save an image from my computer to database on remote server. Win32 masaüstü uygulamasında yaptığım kodlama şu şekilde; Procedure ResimSecF.ResimYukle; var bmp : TBitmap; jpg : TJpegImage; yol : string; Begin Jpg := TJPEGImage.Create; Bmp := TBitmap.Create; yol :=folder + '\' +Label2.Caption; Jpg.LoadFromFile(yol); Bmp.PixelFormat := pf24bit; Bmp.Width := 1024; Bmp.Height := 768; Bmp.Canvas.StretchDraw(Rect(0, 0, 1024, 768), Jpg); Jpg.Assign(Bmp); ResimF.DBImage1.Picture.LoadFromFile(yol); ResimF.TbResimRESIM.Assign(jpg); Jpg.Free; Bmp.Free; End; Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted May 31, 2012 Administrators Share Posted May 31, 2012 Please see \demos\Fileupload demo Quote Link to comment Share on other sites More sharing options...
ibrahim71 Posted May 31, 2012 Author Share Posted May 31, 2012 Please see \demos\Fileupload demo Aradığım bu değildi ama yine de teşekkürler. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted May 31, 2012 Administrators Share Posted May 31, 2012 Aradığım bu değildi ama yine de teşekkürler. Örnekte dosyayı nasıl sunucuya ulaştırabildiğiniz gösterilmiş. O noktadan sonra normal bir dosyaya veya bir tablo'ya kaydetmek için gerekli kodları yazmak yeterli oluyor. Quote Link to comment Share on other sites More sharing options...
ibrahim71 Posted September 3, 2012 Author Share Posted September 3, 2012 FIRST : UPLOAD AN IMAGE TO UNIIMAGE NEXT ; USE THESE CODES FOR SAVE BUTTON var bmp : TBitmap; jpg : TJpegImage; begin Jpg := TJPEGImage.Create; Bmp := TBitmap.Create; Jpg.LoadFromStream(UniFileUpload1.Stream); Bmp.PixelFormat := pf24bit; Bmp.Width := 768; Bmp.Height := 1024; Bmp.Canvas.StretchDraw(Rect(0, 0, 768, 1024), Jpg); Jpg.Assign(Bmp); "TABLE NAME+BLOB FIELD NAME".Assign(jpg); Jpg.Free; Bmp.Free; "TABLE NAME".Post; THIS IS CODE FOR IMAGE TO DB. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.