How to access the properties of a file in laravel 5.2?

1

I'm trying to access the properties of an image

Most of them agree so

$request->file('imagenarticulo')->getsize()

that is to say with the get ahead of the property but to which they have script, I am not able to access, I am looking at the documentation and I do not give with the section to access these properties, Specifically the properties are

  • Test
  • originalName
  • mimeType
  • size
  • error

obviously I could access from some php method, but I would like to find one from Laravel.

    
asked by KurodoAkabane 16.06.2016 в 11:40
source

1 answer

3

Reading the documentation I see that:

For originalName:

$name = Input::file('imagenarticulo')->getClientOriginalName();

For mimeType:

$mime = Input::file('imagenarticulo')->getMimeType();

To size:

$size = Input::file('imagenarticulo')->getSize();

I can not find any way to get the Test or Error attribute.

    
answered by 16.06.2016 / 11:52
source