Original name and extension of the image using Cropper.js and Laravel

56 Views Asked by At

I'm uploading my images with ajax, and using Cropper.js and laravel to upload them to the server. How can I get the original name and extension of the file in the backend?

Result of dd($request->file('my_image'))

Illuminate\Http\UploadedFile {#6538
  -test: false
  -mimeType: "image/png"
  -error: 0
  #hashName: null
  path: "C:\xampp\tmp"
  filename: "php1EB0.tmp"
  basename: "php1EB0.tmp"
  pathname: "C:\xampp\tmp\php1EB0.tmp"
  extension: "tmp"
  realPath: "C:\xampp\tmp\php1EB0.tmp"
  aTime: 2023-09-15 09:43:22
  mTime: 2023-09-15 09:43:22
  cTime: 2023-09-15 09:43:22
  inode: 171136785840103944
  size: 53334
  perms: 0100666
  owner: 0
  group: 0
  type: "file"
  writable: true
  readable: true
  executable: false
  file: true
  dir: false
  link: false
  linkTarget: "C:\xampp\tmp\php1EB0.tmp"
}

0

There are 0 best solutions below