gpt4 book ai didi

jquery - Aviary 照片编辑器破解

转载 作者:行者123 更新时间:2023-12-01 01:35:37 24 4
gpt4 key购买 nike

我正在使用 Aviary 照片编辑器,我希望用户无需编写 PHP 即可使用自己的照片。所以我创建了一个代码,以便用户放置图像的网址,然后他们可以在那里编辑它,代码是

$(function() {
$('#imgsrc').hide();
$('#edit').hide();
$('#sub_img').click(function(e) {
e.preventDefault();
var grant= $('#photo_url').val();
$('#imgsrc').attr('src', grant).show();
$('#edit').show();
});
});

虽然我收到了这个错误

将 URI 提供的图像加载到 urlconfig 键时出现问题。要么您输入的地址错误,要么公众无法访问该地址(以及我们的服务http://featherservices.aviary.com/),要么它实际上并不存在。或者也许你不知道,这一切只是一个梦。醒来吧!

鸟舍的代码是

<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 作为图像编辑器?

最佳答案

如果您允许用户从各种网络资源上传文件。

您可以尝试使用 Filepicker.io 插件来实现上传功能。

https://developers.filepicker.io/docs/web/

关于jquery - Aviary 照片编辑器破解,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14347110/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com