Browse Source
Merge pull request #1773 from david-polak/update-am-docs
Add embedAsBase64 to AssetManager config
pull/1782/head
Artur Arseniev
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
1 deletions
-
src/asset_manager/config/config.js
-
src/asset_manager/view/FileUploader.js
|
|
|
@ -73,6 +73,9 @@ module.exports = { |
|
|
|
// }
|
|
|
|
uploadFile: '', |
|
|
|
|
|
|
|
// In the absence of 'uploadFile' or 'upload' assets will be embedded as Base64
|
|
|
|
embedAsBase64: 1, |
|
|
|
|
|
|
|
// Handle the image url submit from the built-in 'Add image' form
|
|
|
|
// @example
|
|
|
|
// handleAdd: (textFromInput) => {
|
|
|
|
|
|
|
|
@ -32,7 +32,7 @@ module.exports = Backbone.View.extend( |
|
|
|
|
|
|
|
if (uploadFile) { |
|
|
|
this.uploadFile = uploadFile.bind(this); |
|
|
|
} else if (c.embedAsBase64) { |
|
|
|
} else if (!c.upload && c.embedAsBase64) { |
|
|
|
this.uploadFile = this.constructor.embedAsBase64; |
|
|
|
} |
|
|
|
|
|
|
|
|