|
|
|
@ -19,6 +19,17 @@ public class RemoteStreamContentTestController : AbpController |
|
|
|
memoryStream.Position = 0; |
|
|
|
return new RemoteStreamContent(memoryStream, "download.rtf", "application/rtf"); |
|
|
|
} |
|
|
|
|
|
|
|
[HttpGet] |
|
|
|
[Route("Download-With-Custom-Content-Disposition")] |
|
|
|
public async Task<IRemoteStreamContent> Download_With_Custom_Content_Disposition_Async() |
|
|
|
{ |
|
|
|
var memoryStream = new MemoryStream(); |
|
|
|
await memoryStream.WriteAsync(Encoding.UTF8.GetBytes("DownloadAsync")); |
|
|
|
memoryStream.Position = 0; |
|
|
|
Response.Headers.Add("Content-Disposition", "attachment; filename=myDownload.rtf"); |
|
|
|
return new RemoteStreamContent(memoryStream, "download.rtf", "application/rtf"); |
|
|
|
} |
|
|
|
|
|
|
|
[HttpPost] |
|
|
|
[Route("Upload")] |
|
|
|
|