Can you please share the download link at [email protected]?
@maliming, can you please share an example?
How can I get all tenantIds where Edition Feature is Enabled/Avaible with 1 DB Query?
Similar to getting all settings in 1 query:
var settings = await _settingRepository.GetAll().IgnoreQueryFilters()
.Where(c => c.TenantId.HasValue)
.Where(c => c.Name == "MyName")
.Select(c => new { TenantId = c.TenantId.Value, Value = c.Value.ToBool() })
.ToListAsync();
Hi @ismcagdas,
I can't see any error in the logs for the GetReportExcelForDownload
function. It must be working fine.
If there was an error here, user would be thrown UserFriendlyException.
The error must be coming from DownloadTempFile
.
Hi @ismcagdas,
I'm got this problem only once in past 20 days but customer reported it after we switched to Redis cache.
Backend code:
public async Task<FileDto> GetReportExcelForDownload(int id)
{
var report = await _inventoryReportRepository.GetAsync(id);
var bytes = await _azureBlobStorageManager.DownloadByteArray(_inventoryReportContainer, report.ExcelFileName);
var file = new FileDto(report.ExcelFileName, MimeTypeNames.ApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet);
_tempFileCacheManager.SetFile(file.FileToken, bytes);
return file;
}
Frontend code:
constructor(
injector: Injector,
private _inventoryService: InventoryReportServiceProxy,
private _fileDownloadService: FileDownloadService
) {
super(injector);
}
downloadExcel(id) {
this._inventoryService.getReportExcelForDownload(id)
.subscribe(result => this._fileDownloadService.downloadTempFile(result));
}
Hi @ismcagdas,
Our client reported the same error today. Failed on first try and worked on second. Any idea?
Hi @ismcagdas, U can try setting timeout to 2 minutes.
Hi @ismcagdas,
We switched to Redis cache but still getting the same error.
Hi @zony, How can I increases the expiration timeout?