私はAviaryPhotoEditorを使用していますが、ユーザーがPHPを記述せずに自分の写真を使用できるようにしたいと考えています。そこで、ユーザーが画像のURLを配置し、そこで編集できるようにコードを作成しました。コードは
$(function() {
$('#imgsrc').hide();
$('#edit').hide();
$('#sub_img').click(function(e) {
e.preventDefault();
var grant= $('#photo_url').val();
$('#imgsrc').attr('src', grant).show();
$('#edit').show();
});
});
このエラーが発生していますが
There was a problem loading your image provided by URI to the
urlconfig key. Either you typed the address wrong, it's not reachable by the public (and our service at http://featherservices.aviary.com/), or it doesn't really exist. Or maybe YOU don't and this is all just a dream. WAKE UP!
鳥小屋のコードは
<div id="photo_edit">
<!-- Load Feather code -->
<script type="text/javascript" src="http://feather.aviary.com/js/feather.js"></script>
<div id='injection_site'></div>
<input type="text" id="photo_url" placeholder="URL of Image"/>
<button id="sub_img">Submit Image</button>
<img id="imgsrc" src=""/>
<!-- Instantiate Feather -->
<script type="text/javascript">
var featherEditor = new Aviary.Feather({
apiKey: 'LuucZHMFU0yLQSnGBgAqsg',
apiVersion: 2,
tools: 'enhance,resize,crop,contrast,sharpness,text,whiten,effects,orientation,warmth,brightness,saturation,draw,redeye,blemish',
appendTo: '',
onSave: function(imageID, newURL) {
var img = document.getElementById(imageID);
img.src = newURL;
},
onError: function(errorObj) {
alert(errorObj.message);
}
});
function launchEditor(id, src) {
featherEditor.launch({
image: id,
url: src
});
return false;
}
</script>
<!-- Add an edit button, passing the HTML id of the image and the public URL ot the image -->
<p><input id="edit" type='image' src='http://images.aviary.com/images/edit-photo.png' value='Edit photo' onclick="return launchEditor('imgsrc', 'onImageLoad');" /></p>
</div>
誰かが以前にこのプログラムで働いていますか?これはハックであると想定されており、ホストイメージにPHPを使用したくありません。可能であれば、URLを使用して画像エディタとして機能する必要がありますか?