string filePath ="c:\\falan\\filan.jpg"
byte[] buffer = File.ReadAllBytes(filePath);
Response.ContentType = "image/jpeg";
Response.OutputStream.Write(buffer, 0, buffer.Length);
Response.AddHeader("Content-Disposition", "filename=filan.jpg");
filename yanına ";attachment" eklersek sayfa açılırken dosyayı indirmeye başlayacaktır
ContentType : application/pdf, image/jpeg , image/png, image/bmp
gibi
Kaydol:
Kayıt Yorumları (Atom)
.net 6 mapget kullanımı
app.UseEndpoints(endpoints => { endpoints.MapGet("/", async context => { var response = JsonConvert.Seriali...
-
COMMAND PROMPT TEMEL VE İLERİ DÜZEY ANLATIM Command Prompt komutlarını anlatmaya başlamadan önce, MS-DOS komut türlerine değinelim. Komut...
-
Komut ekranına aşagıdaki komutları yazarak windows service işlemlerini gerçekleştirebiliriz. Not : Komut ekranı (Başlat -> Çalıştır -&g...
-
IIS üzerinde angular-site.com site açılır. Add Aplication'dan aynı dizin içine "Api" klasörü seçilir. Buraya .Net Core Uygulam...
Hiç yorum yok:
Yorum Gönder