Hi.
I'm trying to port some of my libraries to be compatible with psr-7 but I found a problem in the spec.
Form-manager is a simple library to manage forms in php. It provides php implementations to some html validation atributes such "required", "pattern", "min", "max", etc.
File inputs can have the "accept" attribute to limit the upload to some mime-types and, of course, there is a php implementation to ensure the uploaded files are right. You can see the implementation here:
https://github.com/oscarotero/form-manager/blob/master/src/Validators/Accept.php#L18As you can see, I use the finfo extension of php to validate the file, because it's not recomended to use the client mime type. The problem is with the UploadedFileInterface I cannot access to the tmp_name of the file. A solution could be get the buffer of the file and use
finfo-buffer but this cannot be done with large files.
I think this interface needs a method like $file->getServerFilename().