|
@@ -132,6 +132,7 @@ interface Pusher {
|
|
|
user: any,
|
|
user: any,
|
|
|
collections: string[],
|
|
collections: string[],
|
|
|
optionsMap: any,
|
|
optionsMap: any,
|
|
|
|
|
+ toGROWIInfo: IDataGROWIInfo,
|
|
|
): Promise<void>
|
|
): Promise<void>
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -400,7 +401,7 @@ export class G2GTransferPusherService implements Pusher {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// eslint-disable-next-line max-len
|
|
// eslint-disable-next-line max-len
|
|
|
- public async startTransfer(tk: TransferKey, user: any, collections: string[], optionsMap: any): Promise<void> {
|
|
|
|
|
|
|
+ public async startTransfer(tk: TransferKey, user: any, collections: string[], optionsMap: any, toGROWIInfo: IDataGROWIInfo): Promise<void> {
|
|
|
const socket = this.crowi.socketIoService.getAdminSocket();
|
|
const socket = this.crowi.socketIoService.getAdminSocket();
|
|
|
|
|
|
|
|
socket.emit('admin:g2gProgress', {
|
|
socket.emit('admin:g2gProgress', {
|
|
@@ -459,6 +460,14 @@ export class G2GTransferPusherService implements Pusher {
|
|
|
attachments: G2G_PROGRESS_STATUS.IN_PROGRESS,
|
|
attachments: G2G_PROGRESS_STATUS.IN_PROGRESS,
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ if (toGROWIInfo.attachmentInfo.type === 'none' && ['aws', 'gcs'].includes(this.crowi.configManager.getConfig('crowi', 'app:fileUploadType'))) {
|
|
|
|
|
+ socket.emit('admin:g2gProgress', {
|
|
|
|
|
+ mongo: G2G_PROGRESS_STATUS.COMPLETED,
|
|
|
|
|
+ attachments: G2G_PROGRESS_STATUS.SKIPPED,
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
try {
|
|
try {
|
|
|
await this.transferAttachments(tk);
|
|
await this.transferAttachments(tk);
|
|
|
}
|
|
}
|