Maybe because there is no write access for C:/wamp64/tmp?
May 12, 2016
9
Level 5
Wamp64, PHP7, Laravel 5.2, tmp folder doesn't store files
So im using wamp64 with php7 im trying to upload images. my form looks likes this:
<form method="POST" action="/dashboard/nalaz/dodaj/{{ $patients->id}}" enctype="multipart/form-data">
<input type="file" name="images[]">
</form>
this is my php.ini file uploads configuration
file_uploads = On
upload_tmp_dir ="C:/wamp64/tmp"
upload_max_filesize = 3M
max_file_uploads = 5
Now i do this in my laravel controller
$temp = tmpfile();
$images = $request->file('reportimages');
dd($images);
dd() gives me the array of uploaded files
array:1 [▼
0 => UploadedFile {#363 ▼
-test: false
-originalName: "11082663_10205108991016758_689124932158641809_n.jpg"
-mimeType: "image/jpeg"
-size: 42149
-error: 0
path: "C:\wamp64\tmp"
filename: "php95FE.tmp"
basename: "php95FE.tmp"
pathname: "C:\wamp64\tmp\php95FE.tmp"
extension: "tmp"
realPath: "C:\wamp64\tmp\php95FE.tmp"
aTime: 2016-05-12 10:21:16
mTime: 2016-05-12 10:21:16
cTime: 2016-05-12 10:21:16
inode: 0
size: 42149
perms: 0100666
owner: 0
group: 0
type: "file"
writable: true
readable: true
executable: false
file: true
dir: false
link: false
linkTarget: "C:\wamp64\tmp\php95FE.tmp"
}
]
but NOTHING gets written to "C:/wamp64/tmp" so it cannot actually save the immage because there is no image in the tmp folder I am on windows and I granted all permissions for all users for the tmp folder.
Please or to participate in this conversation.