Level 37
How did you access it?
Here is a test file object
Illuminate\Http\Testing\File {#3132
+name: "avatar.jpg"
+tempFile: stream resource {@934
timed_out: false
blocked: true
eof: false
wrapper_type: "plainfile"
stream_type: "STDIO"
mode: "r+b"
unread_bytes: 0
seekable: true
uri: "/private/var/folders/t1/yrwk61ln3c9dsy3cvdxw0z440000gn/T/phphMWhlK"
options: []
}
+sizeToReport: null
-test: true
-originalName: "avatar.jpg"
-mimeType: "image/jpeg"
-size: 70
-error: 0
#hashName: null
path: "/private/var/folders/t1/yrwk61ln3c9dsy3cvdxw0z440000gn/T"
filename: "phphMWhlK"
basename: "phphMWhlK"
pathname: "/private/var/folders/t1/yrwk61ln3c9dsy3cvdxw0z440000gn/T/phphMWhlK"
extension: ""
realPath: "/private/var/folders/t1/yrwk61ln3c9dsy3cvdxw0z440000gn/T/phphMWhlK"
aTime: 2018-10-23 06:51:23
mTime: 2018-10-23 06:51:23
cTime: 2018-10-23 06:51:23
inode: 31382590
size: 70
perms: 0100600
owner: 501
group: 20
type: "file"
writable: true
readable: true
executable: false
file: true
dir: false
link: false
}
Now as soon as I move this image to a specific location, it is no longer a file object. If I try to get the image, I get that as binary. How can I convert the image into same old image object after it is uploaded?
Please or to participate in this conversation.