Replies: 1 comment
-
Hi! It's hard to say, but don't mount the tmp folder.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
i created an api endpoint where i upload a file and i move it to a specific directory in my project. The thing is, the temp file of the uploaded file is not created hence, php cannot obtain its information when i try to move it. Here's the part of the error:
I use a similar approch as the example of file upload as in the Symfony Documentation here: https://symfony.com/doc/current/controller/upload_file.html
Here is the logic of my controller:
The content of my FileUploader:
I thought it is maybe a problem of permissions, in my containr while it was running, i set the ownership of the content of the tmp folder to that of the www-data user using these commands:
chown -R www-data:www-data /tmp
chmod -R u+rwX /tmp
The ownership changed, but i encounter the exact same error when i tried a file upload again. I did not mount the tmp directory on my host machine. The compose.yaml file content is basically the same as that of this repository.
Here is my Dockerfile content:
Beta Was this translation helpful? Give feedback.
All reactions