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

Remove zip file after serving it when export translations #6140

Merged
merged 2 commits into from Aug 31, 2016
Merged

Remove zip file after serving it when export translations #6140

merged 2 commits into from Aug 31, 2016

Conversation

mickaelandrieu
Copy link
Contributor

Questions Answers
Branch? develop
Description? Previously, the zip files stayed in cache folder.
Type? bug fix
Category? BO
BC breaks? no
Deprecations? no
How to test? Use export button in International > Translations > Themes section, then check the zip file is not present in cache folder.

Important guidelines

@@ -114,6 +112,7 @@ public function extractThemeAction(Request $request)
$this->get('prestashop.utils.zip_manager')->createArchive($zipFile, $folderPath);

$response = new BinaryFileResponse($zipFile);
$response->deleteFileAfterSend(true);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

You may be surprised by the boolean value, if you pass false or nothing the file wont be deleted.

See my proposal here => symfony/symfony#19799

@thierrymarianne thierrymarianne merged commit e78c609 into PrestaShop:develop Aug 31, 2016
@thierrymarianne
Copy link
Contributor

Thank you @mickaelandrieu

@mickaelandrieu mickaelandrieu deleted the remove-xipfile-after-serve branch August 31, 2016 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants