pimcore / web-to-print-bundle

Web-to-Print community bundle adds web-to-print features to Pimcore documents.
https://pimcore.com/docs/platform/Web_To_Print/
Other
4 stars 12 forks source link

Use Flysystem as PDF storage for generated documents #72

Open fashxp opened 4 months ago

fashxp commented 4 months ago

currently we use local system tmp directory

https://github.com/pimcore/web-to-print-bundle/blob/4232fe528f7170db3fc76fa0ab20a411f419151d/src/Model/Document/PrintAbstract.php#L104C1-L107C6

that might cause problems in load-balancer architectures as system tmp directory might only live on local node file system.

alexz707 commented 4 months ago

Beware that Flysystem will not solve this problem because it uses is_file in the underlying local fs adapter. This method has the same problem as file_exists. See #73

Workaround is extracted to: https://github.com/pimcore/web-to-print-bundle/blob/1c27202421fea9929a939c5af94b0cfe6ab70f52/src/Controller/Document/PrintpageControllerBase.php#L447