file upload - Laravel intervention image not returning an extension -


When I try to save an image using the larval interference image library it works but the extension Is missing

When I die and dump the output of the image :: make () method, I get this:

  object (interference \ image \ image) [ 304] Public 'Resources' = & gt; Resources (9, GD) public 'type' = & gt; Int 2 public 'width' = & gt; Intel 480 public 'height' = & gt; Int 640 Public 'Dynamen' = & gt; String '/ tmp' (length = 4) public 'basename' = & gt; String 'phpJHlKbK' (length = 9) public 'extension' = & gt; Nulled public 'filename' = & gt; String 'phpJHlKbK' (length = 9) public 'mime' = & gt; String 'image / jpeg' (length = 10) protected 'original' = & gt; Null public 'encoded' = & gt; Blank   

The file being uploaded is an extension, but I can not access it because it assumes that no one exists. any idea?

The intervention image says the doctor:

  the current filename image File extension, if the example was created from the file.   

So the 'mime' for the 'unknown' has been suggested, probably the raw post data image files:

  $ mime = $ image- & gt; Mime (); Edit due to update for 2.x ($ mime == 'image / jpeg') $ extension = '.jpg'; Otherwise ($ mime == 'image / PNG') $ extension = '.png'; Otherwise ($ mime == 'image / gif') $ extension = '.gif'; And $ extension = '';    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -