0

how do I get the file path of my uploaded file in laravel? it seems that it gives me the wrong output

UploadedFile {#2817 ▼
  -test: false
  -originalName: "logfile.dat"
  -mimeType: "application/octet-stream"
  -error: 1
  #hashName: null
  path: ""
  filename: ""
  basename: ""
  pathname: ""
  extension: ""
  realPath: "C:\Users\Me\Desktop\LARAVEL-PROJ\public"
  aTime: 1970-01-01 08:00:00
  mTime: 1970-01-01 08:00:00
  cTime: 1970-01-01 08:00:00
  inode: false
  size: false
  perms: 00
  owner: false
  group: false
  type: false
  writable: false
  readable: false
  executable: false
  file: false
  dir: false
  link: false
}
Sohel0415
  • 9,523
  • 21
  • 30
  • If `error: 1` happens to come from [`$_FILES`](http://php.net/manual/en/features.file-upload.errors.php) (I know nothing about Laravel) then it means "The uploaded file exceeds the upload_max_filesize directive in php.ini" so there's no path to show. – Álvaro González Jan 09 '19 at 07:33
  • According to @ÁlvaroGonzález his comment I've found a question that could relate to this one: https://stackoverflow.com/questions/4255617/file-upload-large-file-gives-error-1-even-though-upload-max-size-is-bigger-tha – Koen Hollander Jan 09 '19 at 07:36
  • please share your controller code – Ashish Jan 09 '19 at 09:39
  • Possible duplicate of [How to set view file path in laravel?](https://stackoverflow.com/questions/27458439/how-to-set-view-file-path-in-laravel) – Prathamesh Doke Jan 09 '19 at 09:46

0 Answers0