Unverified Commit 915d19fb authored by Diego Mello's avatar Diego Mello Committed by GitHub
Browse files

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

parent bbc8fe53
......@@ -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;
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment