When I upload a file to my API on vagrant everything works fine and laravel writes the file to /tmp/phpLRJnhx
. When commit everything and pull the code on the live server Laravel writes the file to /var/www/webdir.nl/public
. Why doesn't Laravel write the file to /tmp/
on the live server?
Asked
Active
Viewed 752 times
0

Bart Bergmans
- 4,061
- 3
- 28
- 56
1 Answers
2
The location where uploaded files are stored can be configured using the upload_tmp_dir configuration option. To check the current temp directory see the output of sys_get_temp_dir()
.

Ismail RBOUH
- 10,292
- 2
- 24
- 36
-
`sys_get_temp_dir()` returns `/tmp` and not the public directory of my laravel project. – Bart Bergmans Jul 01 '16 at 07:38
-
Please take a look at this answer [stackoverflow](http://stackoverflow.com/questions/30970532/laravel-5-getrealpath-doenst-show-correct-value) – Ismail RBOUH Jul 01 '16 at 07:47