Skip to content

[Forwardport] Remove PDF files after generation #17280

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

Merged
merged 5 commits into from
Aug 10, 2018
Merged

[Forwardport] Remove PDF files after generation #17280

merged 5 commits into from
Aug 10, 2018

Conversation

tiagosampaio
Copy link
Member

@tiagosampaio tiagosampaio commented Jul 30, 2018

Original Pull Request

#16401

Description

Upon invoice/packingslip/credit memo printing the system generates a PDF file directly in the var directory. I see no reason for keeping these files since they are not accessible publicly via web (sharing purpose). There's no "reuse" purpose as well since on every print action a new file with a new filename is being generated.
This PR provides a logic for removing a PDF file once it's generated.
Currently, it's implemented only within a scope of the invoice printing. Once we agree on the solution, I will adjust other places with PDF generation.

Fixed Issues (if relevant)

  1. Print pdf don't delete file in var folder #3535
  2. PDF invoices in /var folder #14517

Manual testing scenarios

  • Open an existing invoice in the admin panel.
  • Click the "Print" button.
  • You should have the invoice downloaded.
  • You should not have a generated PDF file in the var directory.

@magento-engcom-team
Copy link
Contributor

Hi @tiagosampaio. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me {$VERSION} instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@miguelbalparda
Copy link
Contributor

@tiagosampaio I've seen you routinely port other devs code. I'd rather have the original author doing the back/forward port when possible and you porting everything that's available is not helping with that.

@tiagosampaio
Copy link
Member Author

@miguelbalparda as you wish, Sr.

@magento-engcom-team
Copy link
Contributor

Hi @tiagosampaio. Thank you for your contribution.
We will aim to release these changes as part of 2.3.0.
Please check the release notes for final confirmation.

@tiagosampaio tiagosampaio deleted the 2.3-develop-PR-port-16401 branch August 10, 2018 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants