0

It might be a strange question but I am asked if it is possible and I don't know the answer. In Windows it is possible to add details to a file, like an author and labels etc. Is there any way in PHP I can read these details when this file is uploaded to the server (our client would like to use it to tag files on their server).

Toto
  • 89,455
  • 62
  • 89
  • 125
sprunk
  • 33
  • 1
  • 1
  • 7
  • 5
    No, none of this information is passed in the HTTP protocol when uploading files. Read the documentation of `$_FILES`, it tells you everything you can tell about the file. – Barmar Oct 16 '14 at 15:25
  • 1
    ...however, there's nothing stopping you from having other fields with this information accessible through `$_POST` – Powerlord Oct 16 '14 at 15:29
  • https://stackoverflow.com/questions/17931378/how-to-read-file-properties-with-php – Dharman Aug 20 '21 at 20:16

2 Answers2

1

That information you mention it's called metadata.

You can use this php library to do the trick.

http://getid3.sourceforge.net/

jonyjm
  • 963
  • 2
  • 7
  • 15
0

Out of the box functionality doesn't pass this information when uploading files using PHP.

The documentation for $_FILES shows all of the details you can get about the file

Luke
  • 22,826
  • 31
  • 110
  • 193