ITemporaryFileStorageinterface that uses a S3-compatible storage system to store files (images, video, audio etc.) that are uploaded in the editor. These files are later copied to the permanent content storage once the users save their changes. You can find it at /packages/h5p-mongos3/src/S3TemporaryFileStorage.ts.
S3TemporaryFileStorage! It's also your responsibility to configure the bucket to automatically delete old temporary files after a sensible timespan (e.g. 1 day).
npm install aws-sdk!
initS3and through the function parameters. Alternatively you can use these environment variables instead of using the function parameters:
h5ptemporarybucketto any name you want, but you must specify one. You must create the bucket manually before you can use it.
initS3is passed on to
aws-sdk, so you can set any custom configuration values you want.
initS3or and instantiate the required client yourself.
maxKeyLengthto the value you need. It defaults to 1024.
S3TemporayStorageto customize access restrictions: