Using aws-s3 provider can't use local assets



  • When I register the fs-store persistence provider as "aws-s3" it makes it so that local assets are not found. Is there a way to use these in conjunction with each other?



  • If it helps, here is my config:
    { "store": { "provider": "fs" }, "extensions": { "fs-store": { "persistence": { "provider": "aws-s3" } }, "fs-store-aws-s3-persistence": { "lock": { "queueName": "jsreport-lock.fifo", "region": "us-west-2" }, "s3Options": { "region": "us-west-2" } }, "scripts": { "timeout": 40000, "strategy": "http-server" }, "sample-template": { "createSamples": true }, "assets": { "allowedFiles": "**/*.*", "searchOnDiskIfNotFoundInStore": true, "publicAccessEnabled": true } }, "httpPort": 2945, "certificate": { "key": "certificates/server.key", "cert": "certificates/server.cert" }, "blobStorage": { "provider": "fs" }, "logger": { "console": { "transport": "console", "level": "debug" }, "file": { "transport": "file", "level": "info", "filename": "logs/reporter.log" }, "error": { "transport": "file", "level": "error", "filename": "logs/error.log" } }, "allowLocalFilesAccess": true, "templatingEngines": { "timeout": 40000, "strategy": "http-server" }, "chrome": { "timeout": 40000 } }
    ^^When I remove the aws stuff, it lets me use local assets just fine.



  • After some digging through the provider code.. I think I don't want to use aws-s3 as an entire fs-store. Instead I'd like to have all reports saved to s3 after they have bene created. I don't want templates or data to be stored there instead. Any good method of achieving this?



  • I have resolved this myself by using a plugin: https://github.com/fgauer/jsreport-s3-storage



  • There is also official reports s3 driver.
    https://github.com/jsreport/jsreport-aws-s3-storage


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.