multimesut Posted September 14, 2018 Share Posted September 14, 2018 Merhaba, unigui projemizdeki bir link çağrıldığında bir oluşturup indirilmesini istiyorum. bunu nasıl yapabiliriz? Aşağıdaki yol işe yaramadı. Boş sayfa geliyor. if(ARequestInfo.Document = '/test') then begin filename:=UniServerModule.TempFolderPath + 'test.wav'; AResponseInfo.FreeContentStream := True; AResponseInfo.ContentStream:=TFileStream.Create(FileName, fmOpenRead or fmShareDenyWrite); AResponseInfo.ContentLength := AResponseInfo.ContentStream.Size; AResponseInfo.ContentType := FileType2MimeType(FileName); Handled := True; end; Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted September 15, 2018 Administrators Share Posted September 15, 2018 SendFile() yapmanız lazım, ancak o bir Session varken çağrılabiliyor. Quote Link to comment Share on other sites More sharing options...
multimesut Posted September 17, 2018 Author Share Posted September 17, 2018 Evet SendFile Session oluştuğunda çağırılabiliyor. Benim burada amacım bir api hazırlamak. Bu api link olarak çağırıldığında dosyayı oluşturup göndermek ardındanda dosyayı silmek. 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.