Base solution for your next web application
Open Closed

Retrieve File From Database to Client. #8704


User avatar
0
CNS created

How to Retrieve the Uploaded File from Database to client and also allow him/her to download it (As there is only built in functionality for Uploading File).


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @CNS

    You can use IBinaryObjectManager for this. You can check FileController.cs for sample usage.

  • User Avatar
    0
    CNS created

    Hi,

    But on angular side there is a <fileupload> tag by ng-prime for uploading a file but I can't find a tag to preview a file or attachment.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @CNS

    There is no component for previewing a file, at least I don't know. Wihtout preview, you can put an anchor element to your page and set its href proprert.

    <a href="/File/DownloadBinaryFile?id={id}&contentType=application/zip&fileName=collectedData.zip">Download</a>