ethar's avatar
Level 5

$request->imags return /tmp/phpGVIf3O

i try to upload file using PostMan, in laravel part i when return $request->images. i got ths values /tmp/phpGVIf3O

	public function uploadCompanyPhotos(NullRequest $request)
	{
		$user = Auth::user();
		$photos  = [];
        return $request->images;
	}

in postman i chose input type file, and set header content, multipart

0 likes
3 replies
Snapey's avatar
Snapey
Best Answer
Level 122

php uploads all files with a temporary name. You must then move the image

1 like
ethar's avatar
Level 5

@Snapey , thanks, please, why dd not working here, its go out of foreach


foreach ($request->file('images') as  $image) {
            dd($request->file('images'));
}
dd(1);

by why print 1, not $request->file

Snapey's avatar

perhaps you don't post 'images' You have to give your file input field a name

Please or to participate in this conversation.