[FIX] Cancel upload and check failed upload (#1232)

This commit is contained in:
Diego Mello 2019-09-25 18:31:53 -03:00 committed by GitHub
parent bbc8fe5398
commit 915d19fbe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -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) {

View File

@ -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;
});