Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Commit 7245e0a

Browse files
committed
Change filepicker uploading to pickAndStore, fix services defaults
1 parent df6b451 commit 7245e0a

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

angular-redactor-filepicker.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -265,21 +265,29 @@ RedactorPlugins.filepicker = function() {
265265
this.button.setAwesome('filepicker', 'fa-image');
266266
},
267267
show: function() {
268-
filepicker.pick(this.filepicker.insert, {
268+
filepicker.pickAndStore({
269269
mimetype: 'image/*',
270270
container: 'modal',
271+
multiple: false,
272+
debug: false,
273+
maxSize: 2000 * 1024 * 1024,
274+
folders: false,
271275
services: [
272276
"COMPUTER",
273277
"IMAGE_SEARCH",
274278
"URL",
275-
"FTP"
279+
"DROPBOX",
280+
"GOOGLE_DRIVE",
276281
]
277-
});
282+
}, {
283+
location:'S3',
284+
path:'/',
285+
access: 'public'
286+
}, this.filepicker.insert);
278287

279288
},
280289
insert: function(object) {
281-
html = "<img src='" + object.url + "'>"
282-
290+
html = "<img src='" + object[0].url + "'>"
283291
this.insert.html(html);
284292

285293
this.code.sync();

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-redactor-filepicker",
33
"main": "angular-redactor-filepicker.js",
4-
"version": "2.2.0",
4+
"version": "2.3.0",
55
"homepage": "https://github.com/UseFedora/angular-redactor",
66
"authors": [
77
"Tyler Garlick <tjgarlick@gmail.com>",

0 commit comments

Comments
 (0)