Base solution for your next web application
Open Closed

Download File #7206


User avatar
0
dev_frontrush created

I have a proxy service that gets a byte array (file contents) and want the user to be able to download it. This looks like it worked at one time (https://forum.aspnetboilerplate.com/viewtopic.php?p=26371) but the temp folder was removed. How to do this?

The proxy service is in the Application project and inherits from the AppServiceBase. The proxy service gets files from S3 and returns them to other services in the Application project as a byte array. They are secure files and must have a specific permission to download. The proxy service could be moved as it is not publicly available / marked as internal and will only be used by other services that inherit from the ApplicationServiceBase class.

The other services need to be able to push the byte array as one of the MimeTypeNames to the user to download the file.

This seems like one of the most basic needs of a web application but I can't find a solution. Am I overlooking something?

Angular + Core 6.9 and 7.0


1 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    I couldn't get what's the blocking point that prevents you to post/return a byte[]. You can always create a controller (FileController) in your proxy service or in the *.Web.Host project.