MOBILE-2825 glossary: Delete temporary files after saving entry

main
Albert Gasset 2019-02-04 10:55:58 +01:00
parent 7a2f552514
commit 0c428eb257
2 changed files with 4 additions and 1 deletions

View File

@ -232,6 +232,9 @@ export class AddonModGlossaryEditPage implements OnInit {
attach, timecreated, undefined, this.entry, !this.attachments.length, !this.glossary.allowduplicatedentries);
}
}).then((entryId) => {
// Delete the local files from the tmp folder.
this.uploaderProvider.clearTmpFiles(this.attachments);
if (entryId) {
// Data sent to server, delete stored files (if any).
this.glossaryHelper.deleteStoredFiles(this.glossary.id, this.entry.concept, timecreated);

View File

@ -29,7 +29,7 @@ export class AddonModGlossaryHelperProvider {
private glossaryOffline: AddonModGlossaryOfflineProvider) {}
/**
* Delete stored attachment files for a new discussion.
* Delete stored attachment files for a new entry.
*
* @param {number} glossaryId Glossary ID.
* @param {string} entryName The name of the entry.