Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Cancel upload and check failed upload #1232

Merged
merged 2 commits into from
Sep 25, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/lib/methods/sendFileMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion app/views/RoomView/UploadProgress.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down