froala / froala/KMSFroalaEditorBundle

imageUploadToS3 Config

Open
#131 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

I can't find any clear documentation on configuring a S3 bucket for the image upload for the particular method I'm trying to use.

```
// kms_froala_editor.yaml
kms_froala_editor:
serialNumber: '%env(FROALA_ACTIVATION_CODE)%'
language: en_ca
includeJS: true
includeCSS: true
htmlRemoveTags: ["base"]
imageUploadToS3:
bucket: '%amazon_bucket%'
region: '%amazon_region%'
keyStart: 'uploads/images'
accessKeyId: '%amazon_key%'
acl: 'public-read'
```

When I go to submit an image I get the following error in the browser

`POST https://us-east-1.amazonaws.com/bucket net::ERR_NAME_NOT_RESOLVED`

The region and bucket name conform to the aws s3 set.

I based my config on this code block:

```
// src/Resources/public/froala_editor/html/image_s3_upload.php
(function(){
new FroalaEditor("#edit",{
enter: FroalaEditor.ENTER_P,
fileUploadToS3: {
bucket: '',
region: '',
keyStart: '',
params: {
acl: '',
AWSAccessKeyId: '',
policy: '',
signature: '',
}
},
events: {
'image.uploadedToS3': function(link, key, response) {
console.log ('S3 Link:', link)
console.log ('S3 Key:', key)
}
}
})
})()
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.