Reputation: 6554
I am trying to post the Image url and what is coming out is something like so=
https://www.filepicker.io/api/file/GEghdsg4Shy7aY0xY6ywc
And what I want is
https://www.filepicker.io/api/file/asdf8dsf7asdfasdf.png
For this ruins the Fancy Box code I use since it is checking if it is an image in that plugin.
My code is as follows-
$(function(){
filepicker.setKey('myKey');
$("#newImage").on('click',function(){
filepicker.pick({mimetypes: ['image/*'],},function(FPFile) {
var imgU = FPFile.url;
var text=$('#text_editor_textarea');
text.val(text.val()+'[img]'+imgU+'[/img]');
});
});
});
I tried other methods of FPFile.url and honestly i can't seem to find the correct way to parse out the image url and not the hosting location url.
Upvotes: 0
Views: 214
Reputation: 8051
Filepicker will ignore things after a + so you can add anything you want after a + in the url.
E.G. Both will resolve properly.
https://www.filepicker.io/api/file/GEghdsg4Shy7aY0xY6ywc
https://www.filepicker.io/api/file/GEghdsg4Shy7aY0xY6ywc+whateveryouwant.png
Upvotes: 1