[BinaryDownload] Getting error

Forge Component
(3)
Published on 2017-11-17 by Joey Moree
3 votes
Published on 2017-11-17 by Joey Moree

Hi Team,

I am getting error when I used the extension.


Thanks,

Rajat Agrawal

Hi Rajat ,

did you make sure to set the data type of the binary date in the entity ? 

João Moreira wrote:

Hi Rajat ,

did you make sure to set the data type of the binary date in the entity ? 


Hi Joao,

Which entity you are talking here. I am sending url in the input parameter.


Thanks,

Rajat Agrawal

I had the same issue, didn't have any time find to correct the solution properly. I just needed the binary file (for an image), so modified the solution to handle my immediate needs.

I found the issue was related to he lines below I never needed a filename, so I just hardcoded a filename, and I commented out ContentDisposition, which was causing the null reference.

You can find the problem around lines 95/96 of BinaryDownload.cs

//           ContentDisposition cDispo = new ContentDisposition(response.Headers.GetValues("Content-Disposition")[0]);
                        ssFileName = "DownloadedFile";// cDispo.FileName;


If someone has time to look into the issue further, this is a handy component.