[FIX] Cancel upload and check failed upload (#1232)
This commit is contained in:
parent
bbc8fe5398
commit
915d19fbe8
|
@ -14,7 +14,7 @@ export async function cancelUpload(item) {
|
|||
uploadQueue[item.path].abort();
|
||||
try {
|
||||
const db = database.active;
|
||||
await db.database.action(async() => {
|
||||
await db.action(async() => {
|
||||
await item.destroyPermanently();
|
||||
});
|
||||
} catch (e) {
|
||||
|
|
|
@ -122,7 +122,8 @@ class UploadProgress extends Component {
|
|||
uploads.forEach(async(u) => {
|
||||
if (!RocketChat.isUploadActive(u.path)) {
|
||||
try {
|
||||
await database.database.action(async() => {
|
||||
const db = database.active;
|
||||
await db.action(async() => {
|
||||
await u.update(() => {
|
||||
u.error = true;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue