Open Closed

Retrieve File From Database to Client. #8704


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)
  • 0
    ismcagdas created

    Hi @CNS

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

  • 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.

  • 0
    ismcagdas created

    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.

    &lt;a href=&quot;/File/DownloadBinaryFile?id={id}&amp;contentType=application/zip&amp;fileName=collectedData.zip&quot;&gt;Download&lt;/a&gt;