Skip to content

formidable, clean up temp files #2398

Merged
canstudios-nicolaw merged 3 commits intorelease/bugpatchfrom
issue/2115
Aug 16, 2019
Merged

formidable, clean up temp files #2398
canstudios-nicolaw merged 3 commits intorelease/bugpatchfrom
issue/2115

Conversation

@lc-thomasberger
Copy link
Copy Markdown
Member

fixes #2115

Course import cleans up tempfile already.
This PR handles cleanup for uploaded files from assetmanager and pluginmanager.

Todo Serverrewrite:

  • Abstract into a Class so it can be shared across the AT
  • Expose uploade directory as config attribute. Default to folder inside AT-root

remove temp file in assetmanager
remove uploaded zip file
remove unzipped folder
@lc-thomasberger lc-thomasberger changed the base branch from master to release/bugpatch July 23, 2019 12:20
@lc-thomasberger lc-thomasberger self-assigned this Jul 23, 2019
@lc-thomasberger lc-thomasberger added this to the Bugpatch milestone Jul 23, 2019
@lc-thomasberger lc-thomasberger added the S: awaiting-review Completed issues waiting on reviews label Jul 23, 2019
Comment thread lib/assetmanager.js
log error
@tomgreenfield tomgreenfield requested a review from taylortom July 25, 2019 09:21
@canstudios-nicolaw
Copy link
Copy Markdown
Contributor

To aid testing - please could you explain which files normally get left in temp during asset and plugin upload?

Copy link
Copy Markdown
Contributor

@tomgreenfield tomgreenfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👁️

res.statusCode = 200;
return res.json({ success: true, pluginType: pluginType, message: 'successfully added new plugin' });

function sendResponse() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could log any errors from fs.remove() like above but it's not crucial.

Copy link
Copy Markdown
Contributor

@canstudios-nicolaw canstudios-nicolaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👁️

@canstudios-nicolaw canstudios-nicolaw merged commit dc3d5a4 into release/bugpatch Aug 16, 2019
@tomgreenfield tomgreenfield deleted the issue/2115 branch September 10, 2019 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S: awaiting-review Completed issues waiting on reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants