Most references seem to read files using PHP functions like file_get_contents()
, fgets()
, fread()
, or readfile()
.
Is there is any Drupal API that allows to read uploaded files independent of underlying storage?
We are using AWS S3 as our file field storage. Our ec2 instance is in a private subnet with an interface to S3 services. Say the URI is s3://bucketname/object.csv. I need a Drupal API that does an s3 getObject() SDK call under the hood that way I don't get blocked on network level instead request goes through the S3 network interface.