i have code
var feathereditor = new aviary.feather({ apikey: 'your-client-id-here', theme: 'light', // check out our new 'light' , 'dark' themes! tools: 'all', 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; }
<!-- load feather code --> <script type="text/javascript" src="http://feather.aviary.com/imaging/v3/editor.js"></script> <div id='injection_site'></div> <img id='image1' src='http://images.aviary.com/imagesv5/feather_default.jpg'/> <!-- add edit button, passing html id of image , public url of image --> <p><input type='image' src='http://images.aviary.com/images/edit-photo.png' value='edit photo' onclick="return launcheditor('image1', 'http://images.aviary.com/imagesv5/feather_default.jpg');" /></p>
i want save images generate aviary: https://s3.amazonaws.com/feather-client-files-aviary-prod-us-east-1/2016-06-06/178ba6a3-0488-4b43-b4bc-133cf499c72c.jpg , insert mysql.
how can take url , insert mysql.
thanks much!
if still need answer...
the function onsave show amazon temporary url edited image. it`s in 'newurl' variable.
so, can run ajax call send database.
this part of code goes inside onsave function.
$.ajax({ url: <url_to_your_controller>, type:'post', data: { image_url : newurl, }, success:function() { alert("yeah! did it!") } });