Image naming format in beqom
This article details the recent modification performed on the image naming format and the impacts for the implementation and the Ops teams when migrating customer projects to beqom version 9.2 and 10.
In the beqom Admin Portal and in the Web Application, the payee and user images are stored in the two following containers:
| Container Name | Description | File Format |
|---|---|---|
| userimg | Stores the user images from the k_users table | {TENANT UID}/{uid_user} (from the k_users table) |
| payeeimg | Stores the payee images from the py_payee table | {TENANT UID}/{uid_payee} (from the py_payee table) |
Impact for Implementation Team
This modification has an impact for the implementation team when migrating projects with SSRS reports stored in Azure to version 9.2 and 10 of beqom.
From now on, it is required to follow the new naming format as described in the following table:
| Old File Naming Format | New File Naming Format | Modification | Cache Control |
|---|---|---|---|
| payeeimg/{tenantuid}_{idPayee}.{extension} | payeeimg/{tenantuid}/{uid_payee} | The extension has been dropped. The uid_payee parameter is used instead of idPayee. | max-age= 86400 |
| userimg/{tenantuid}_{idUser}.{extension} | userimg/{tenantuid}/{uid_user} | The extension has been dropped. The uid_user parameter is used instead of idUser. | max-age= 86400 |
Impact for Ops Team
An operation must be performed by the Ops team in order to migrate all the images when a customer upgrades is current version of beqom to version 9.2 or 10.
The following Gateway API method must be executed:
Endpoint
/api/file/MigrateImages
Action
POST
During the execution of this method, the endpoint creates two log files payeeimagemigration-log and userimagemigration-log in order for the Ops team to better understand the operations performed during the images migration from the old to the new format.
The log file name is E9A8C032-2615-47CE-93B9-14FF52D2C7D1/Log-2020-11-26-205539.640.json' and shares the following format:
{
status: String,
total_files: Integer,
executed_files: Integer,
begin_date: DateTime,
curent_date: DateTime
}
The following table details the above parameters:
| Parameter | Description |
|---|---|
| status | Status of the execution:
|
| total_files | The number of files for a specific tenant sharing the format {tenantuid}_{id}.{extension} |
| executed_files | The number of already executed files |
The detail file name is E9A8C032-2615-47CE-93B9-14FF52D2C7D1/LogDetail-2020-11-26-205539.640.json' and shares the following format:
[
{
operation_name: String
operation_date: DateTime,
old_file_name: String,
new_file_name: String,
}
]
The following table details the above parameters:
| Parameter | Description |
|---|---|
| operation_name | The operation can be "relocate" or "rename". The relocation operation is performed when the images are not used anymore because:
The renaming operation is performed if the image shares the old naming format: {tenant uid}_{user or payee id}.{extension}. |
| old_file_name | Old naming format |
| new_file_name | New naming format |