Merged PR 307: 音声ファイルZIPファイルをコンテナ配下に平置きするよう修正する
## 概要 [Task2346: 音声ファイルZIPファイルをコンテナ配下に平置きするよう修正する](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2346) - 音声ファイルZIPのアップロード/ダウンロードを、コンテナ直下で操作するよう修正しました - Typistによる中間生成物アップロード対応のため - ツール側も修正しました。(詳細は補足参照) - タスク一覧に表示するファイル名から.zipを抜きました(顧客要望) ## レビューポイント - 対応に抜け漏れ無いか ## 動作確認状況 - ローカルでアップロード/ダウンロードできることを確認しました - タスク一覧も確認しました ## 補足 - ツール側の修正もあります。 - DL時にファイル名を抜き出しているところがありますが、そこを本修正に合わせて修正してます。 https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/_git/OMDSDictation/pullrequest/25?_a=overview
This commit is contained in:
parent
4565d59a51
commit
e279957392
@ -1098,7 +1098,9 @@ const DictationPage: React.FC = (): JSX.Element => {
|
||||
<td className={styles.clm6}>{x.workType}</td>
|
||||
)}
|
||||
{displayColumn.FileName && (
|
||||
<td className={styles.clm7}>{x.fileName}</td>
|
||||
<td className={styles.clm7}>
|
||||
{x.fileName.replace(".zip", "")}
|
||||
</td>
|
||||
)}
|
||||
{displayColumn.FileLength && (
|
||||
<td className={styles.clm8}>{x.audioDuration}</td>
|
||||
|
||||
@ -114,9 +114,7 @@ export class AccountsController {
|
||||
})
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(AuthGuard)
|
||||
@UseGuards(
|
||||
RoleGuard.requireds({ roles: [ADMIN_ROLES.ADMIN] }),
|
||||
)
|
||||
@UseGuards(RoleGuard.requireds({ roles: [ADMIN_ROLES.ADMIN] }))
|
||||
@Post('licenses/summary')
|
||||
async getLicenseSummary(
|
||||
@Req() req: Request,
|
||||
|
||||
@ -213,13 +213,11 @@ export class FilesService {
|
||||
//DBから国情報とアカウントIDを取得する
|
||||
let accountId: number;
|
||||
let country: string;
|
||||
let userId: number;
|
||||
try {
|
||||
const user = await this.usersRepository.findUserByExternalId(
|
||||
token.userId,
|
||||
);
|
||||
accountId = user.account.id;
|
||||
userId = user.id;
|
||||
country = user.account.country;
|
||||
} catch (e) {
|
||||
this.logger.error(`error=${e}`);
|
||||
@ -259,7 +257,6 @@ export class FilesService {
|
||||
const url = await this.blobStorageService.publishUploadSas(
|
||||
context,
|
||||
accountId,
|
||||
userId,
|
||||
country,
|
||||
);
|
||||
return url;
|
||||
@ -301,7 +298,6 @@ export class FilesService {
|
||||
const user = await this.usersRepository.findUserByExternalId(externalId);
|
||||
accountId = user.account.id;
|
||||
userId = user.id;
|
||||
userId = user.id;
|
||||
country = user.account.country;
|
||||
isTypist = user.role === USER_ROLES.TYPIST;
|
||||
authorId = user.author_id;
|
||||
@ -351,7 +347,7 @@ export class FilesService {
|
||||
);
|
||||
}
|
||||
|
||||
const filePath = `${file.owner_user_id}/${file.file_name}`;
|
||||
const filePath = `${file.file_name}`;
|
||||
|
||||
const isFileExist = await this.blobStorageService.fileExists(
|
||||
context,
|
||||
|
||||
@ -124,14 +124,12 @@ export class BlobstorageService {
|
||||
/**
|
||||
* SASトークン付きのBlobStorageアップロードURLを生成し返却します
|
||||
* @param accountId
|
||||
* @param userId
|
||||
* @param country
|
||||
* @returns upload sas
|
||||
*/
|
||||
async publishUploadSas(
|
||||
context: Context,
|
||||
accountId: number,
|
||||
userId: number,
|
||||
country: string,
|
||||
): Promise<string> {
|
||||
this.logger.log(
|
||||
@ -175,11 +173,12 @@ export class BlobstorageService {
|
||||
);
|
||||
|
||||
const url = new URL(containerClient.url);
|
||||
url.pathname += `/${userId}`;
|
||||
url.search = `${sasToken}`;
|
||||
|
||||
this.logger.log(
|
||||
`[OUT] [${context.trackingId}] ${this.publishUploadSas.name}`,
|
||||
`[OUT] [${context.trackingId}] ${
|
||||
this.publishUploadSas.name
|
||||
} url=${url.toString()}`,
|
||||
);
|
||||
return url.toString();
|
||||
}
|
||||
@ -246,7 +245,9 @@ export class BlobstorageService {
|
||||
url.search = `${sasToken}`;
|
||||
|
||||
this.logger.log(
|
||||
`[OUT] [${context.trackingId}] ${this.publishDownloadSas.name}`,
|
||||
`[OUT] [${context.trackingId}] ${
|
||||
this.publishDownloadSas.name
|
||||
}, url=${url.toString()}`,
|
||||
);
|
||||
return url.toString();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user