Forum Discussion

creddick's avatar
creddick
New Contributor
6 days ago

Corrupt file issue with BRApi.Utilities.SaveFileBytesToUserTempFolder

Hello

We are using the BRApi.Utilities.SaveFileBytesToUserTempFolder command in a dashboard extender rule to open a file generated by IFS.  It will create PDF or Excel files based on the extension of the file.

When the user tries to open either file type they get one of the following errors.

I am able to locate the generated file in my Temp folder but it won't let me open from there either.

Has anyone see this or know of a solution?  I am aware it is a MS issue probably not OS, but was just thinking there may be a new way to generate these files so MS doesn't think they are corrupted.

The client is currently on 7.4.2.  They had previously been on 6.8.1 but apparently have not used this dashboard since then.

Thank you

CR

 

  • creddick's avatar
    creddick
    New Contributor

    Also, just as a note, we had to change our coding for generating the fileByte to use UTF8 as seen here:

    Dim fileBytes As Byte() = Encoding.UTF8.GetBytes(dt.rows(0)("FILE_DATA"))

    rather than

    Dim fileBytes As Byte() = dt.Rows(0)("FILE_DATA")