Hello,
We have an app based on DD#4. The download of uploaded excel files seems to corrupt the downloaded file. The download is initiated by a grid row button.
This functionality worked before. Currently we are using version 6.0.20211111.0
Opening the downloaded excel file locally gives this error:
PHP Code:
We found a problem with some content in ’Ludoma_Warehouse_Status_Valence_Download.xlsx’. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes.
PHP Code:
Repair Result to Ludoma_Warehouse_Status_Valence_Download0.xml
Errors were detected in file ’/Users/theo/Downloads/Ludoma_Warehouse_Status_Valence_Download.xlsx’
Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.
The RPG code used:
PHP Code:
lDocOid = %int(%char(GetAppVar('DocOid')));
Exec sql
select trim(fullname), trim(name) into : lFullName, : lName from libbes where oid = : lDocOid;
If SqlCod > 0;
SetResponse('success':'false');
SetResponse('msg':'Error: Document not found');
Else;
vvOut.download = '1';
vvOut.file = %trim(lName);
vvOut_file(%trim(lFullName):vvOut);
SetResponse('success':'true');
SetResponse('info':'File ' + %trim(lName) + ' downloaded successfully,');
EndIf;
Theo
Comment