S3 StreamWrapper

hi;

I registred S3 on StreamWrapper in my app, but this code not work: app/config/config.php

 'viewsDir'       => 's3://dev-phalcon/my-app/',

The screen remains blank, no errors, has anyone tried to save the views in AWS S3?

Sorry for the language barrier. Thank you.

edited 26d ago

Phalcon views are using require/file_get_contents, does plain-php require/file_get_contents even loads such a source? If not then what you expect?

Hi; It works normally:

echo file_get_contents('s3://dev-phalcon/my-app/index.phtml');

viewsDir as Stream not work...

IMO this is expected.

This should work:

$data = file_get_contents('s3://bucket/key');

Whilst:

 'viewsDir'       => 's3://dev-phalcon/my-app/',

does not work as views are loaded before your Amazon S3 stream wrapper gets registered.

Try to register S3 stream wrapper somewhere before you load views (in a loader or so).