Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8600215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:34:03+00:00 2026-06-12T01:34:03+00:00

I have an Edit button next to each uploaded thumbnail on my page that

  • 0

I have an Edit button next to each uploaded thumbnail on my page that summons the Aviary modal upon click. What I’d like to do is replace the original file on FP when I save the outcome of editing in Aviary.
filepicker.saveAs doesn’t seem like the right solution because I don’t want to save to a new file, I just want to replace the file on FP.
The “Saving Back” documentation doesn’t seem to apply because it says to POST a full file to the original URL. Ideally I’d like to just have a function take the original url and the new Aviary URL and replace the contents at the original URL.

Is this possible at the moment? Thanks!!!

I’ve pasted my code here:

<script src='http://feather.aviary.com/js/feather.js'></script>
<script src="https://api.filepicker.io/v0/filepicker.js"></script>
<script type="text/javascript">
$(document).on('click', '.delete-image', function(e) {
  var image = $(this).closest('tr').attr('data-image');
  $('.modal-footer .btn-danger').remove();
  $('.modal-footer').append("<button class='delete-confirmed btn btn-danger' data-image='"+image+"'>Delete</button>");
  $('#myModal').modal('show');
  return false;
});

$(document).on('click', '.delete-confirmed', function(e) {
  e.preventDefault();
  var image = $(this).attr('data-image');
  var row = $("tr[data-image="+image+"]");
  $('#myModal').modal('hide');
  $.ajax({
    url: row.attr('data-link'),
    dataType: 'json',
    type: 'DELETE',
    success: function(data) {
      if (data.success) {
        row.hide();
        filepicker.revokeFile(row.attr('data-fplink'), function(success, message) {
          console.log(message);
        });
      }
    }
  });
  return false;
});

//Setup Aviary
var featherEditor = new Aviary.Feather({
    //Get an api key for Aviary at http://www.aviary.com/web-key
    apiKey: '<%= AVIARY_KEY %>',
    apiVersion: 2,
    appendTo: ''
});
//When the user clicks the button, import a file using Filepicker.io
$(document).on('click', '.edit-image', function(e) {
  var image = $(this).closest('tr').attr('data-image');
  var url = $(this).closest('tr').attr('data-fplink');
  $('#aviary').append("<img id='img-"+image+"'src='"+url+"'>");
  //Launching the Aviary Editor
  featherEditor.launch({
    image: 'img-'+image,
    url: url,
    onSave: function(imageID, newURL) {
      //Export the photo to the cloud using Filepicker.io!
      //filepicker.saveAs(newURL, 'image/png');
      console.log('savin it!');
    }
  });
});

filepicker.setKey('<%= FILEPICKER_KEY %>');
var conversions = { 'original': {},
                    'thumb': {
                    'w': 32,
                    'format': 'jpg'
                  },
};
$(document).on("click", "#upload-button", function() {
  filepicker.getFile(['image/*'], { 'multiple': true,
                                    'services': [filepicker.SERVICES.COMPUTER, filepicker.SERVICES.URL, filepicker.SERVICES.FLICKR, filepicker.SERVICES.DROPBOX, filepicker.SERVICES.IMAGE_SEARCH],
                                    'maxsize': 10000*1024,
                                    'conversions': conversions
                                  },
                                  function(images){
      $.each(images, function(i, image) {
        $.ajax({
          url: "<%= product_images_path(@product.id) %>",
          type: 'POST',
          data: {image: JSON.stringify(image)},
          dataType: 'json',
          success: function(data) {
            if (data.success) {
              $('.files').append('<tr><td><img src="'+image.data.conversions.thumb.url+'"</td></tr>')
            }
          }
        });
      });
  });
});

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:34:04+00:00Added an answer on June 12, 2026 at 1:34 am

    You actually can POST a url to the filepicker url as well, for example

    curl -X POST -d "url=https://www.filepicker.io/static/img/watermark.png"
        https://www.filepicker.io/api/file/gNw4qZUbRaKIhpy-f-b9
    

    or in javascript

    $.post(fpurl, {url: aviary_url}, function(response){console.log(response);});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an asp.net page. There is a button Edit on the bottom that
So I have a webpage scraper that uses backgroundworker to process each page. I
I have a simple table with an edit button at the end of each
Ok, i have 2 edit controls and a button in my main window; in
I have a page where the user can edit various content using buttons and
I have some filter and one grid.And grid have some buttons like modify/edit.I am
I want to try to get an EditText and Button next to each other.
I have a edit page for my ExpenseClaim model. The edit page lists all
I have multiple text fields that each have onChange=submit(); in order to save the
i have a list of tags on a website next to each link and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.