Fix case and add TODO in storage service
Corrected the case for 'MIMEs' in comments for consistency. Added a TODO comment to clarify required file formats in the checkConditions function.
This commit is contained in:
parent
6523e34328
commit
2aa132e511
@ -65,7 +65,7 @@ export class StorageService {
|
||||
// Fetching MIMEs for the associated machines
|
||||
for (const machineId of machineIds) {
|
||||
console.debug(`Fetching mimeTypes for machine : ${machineId}`)
|
||||
// Get mimes associated to a machine
|
||||
// Get MIMEs associated to a machine
|
||||
const allowedMimeId = this.dbService.use()
|
||||
.select()
|
||||
.from(FilesTypeForMachine)
|
||||
@ -78,7 +78,7 @@ export class StorageService {
|
||||
.from(FilesTypesTable)
|
||||
.leftJoin(allowedMimeId, eq(FilesTypesTable.id, allowedMimeId.fileTypeId))
|
||||
console.debug(`Total : ${_allowedMime.length}`)
|
||||
// Append each mime of a machine
|
||||
// Append each MIME of a machine
|
||||
for (const allowedMimeElement of _allowedMime) {
|
||||
_mimes.push(allowedMimeElement.slug)
|
||||
}
|
||||
@ -167,7 +167,7 @@ export class StorageService {
|
||||
try {
|
||||
const info = await this.generateInformation(file, fileDisplayName, isDocumentation);
|
||||
console.log(`Trying to append a new file : "${info.fileDisplayName}"...\n > Checksum SHA-256 : ${info.fileChecksum}\n > Size : ${info.fileSize / (1024*1024)}Mio\n > File format : ${info.fileType.mime}\n`)
|
||||
const condition = await this.checkConditions([], file)
|
||||
const condition = await this.checkConditions([/* TODO import autorized file format */], file)
|
||||
if (!condition) {
|
||||
console.warn(`File "${info.fileDisplayName}" did not pass the files requirement.\n${info.fileChecksum}`)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user