1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 21:06:42 +07:00

audio editor

This commit is contained in:
Fedor Katurov 2019-10-21 17:51:52 +07:00
parent a9d4be064e
commit 645ea8e29e
15 changed files with 273 additions and 9 deletions

View file

@ -38,6 +38,7 @@ export const EMPTY_UPLOAD_STATUS: IUploadStatus = {
thumbnail_url: null,
type: null,
temp_id: null,
name: null,
};
// for targeted cancellation

View file

@ -12,6 +12,7 @@ export interface IUploadStatus {
thumbnail_url: string;
progress: number;
temp_id: UUID;
name: string;
}
export interface IUploadState {

View file

@ -78,8 +78,10 @@ function* uploadFile({ file, temp_id, type, target }: IFileWithUUID) {
{
preview,
is_uploading: true,
type: file.type,
// type: file.type,
temp_id,
type,
name: file.name,
}
)
);
@ -106,7 +108,7 @@ function* uploadFile({ file, temp_id, type, target }: IFileWithUUID) {
if (error) {
return yield put(
uploadSetStatus(temp_id, { is_uploading: false, error: data.detail || error })
uploadSetStatus(temp_id, { is_uploading: false, error: data.detail || error, type })
);
}
@ -116,8 +118,10 @@ function* uploadFile({ file, temp_id, type, target }: IFileWithUUID) {
error: null,
uuid: data.id,
url: data.full_path,
type,
thumbnail_url: data.full_path,
progress: 1,
name: file.name,
})
);