Custom File Upload tempDir
Hi,
I encountered a problem when dealing with file uploads in a multi server instance environment. As I cannot be sure to land on the same instance two requests in a row, I cannot rely on filesystem to store tmp files.
I tried to provide Amazon Web Service S3 path as value for my $handleFileUploadsTempDir but it did not work because SerializableFile::getAsFile() method uses php function tempnam() that does not support custom stream wrapper.
The result of tempnam() is the system's default temporary directory instead of the given S3 tempDir
Is there a way to make it work with S3 (or any other external filesystem) or maybe did I miss something on file uploads part ? Any other suggestion on how to handle this use case is welcome :-)
Thank you !
Hello, I encountered same problem here. I deployed a symfony app to kubernetess and I cannot expect same user on same pod each time.
Any advancement here? Thanks
P.D: Maybe a good option can be to use Gaufrette as abstraction layer to handle file uploads? @craue
I opened a PR with some changes that fixes this issue. Please see #353