Alrick Deillon
Alrick Deillon

Reputation: 119

Filepicker.io - Pick and Store upload files two times

Currently implementing Filepicker in my project.

When using the pickAndStore function with the javascript lib, the file appears twice in my console but only once in S3.

Any idea?

Here is my code :

filepicker.setKey('XXX');

filepicker.pickAndStore({
  multiple: true,
  services: ['DROPBOX', 'FACEBOOK', 'INSTAGRAM', 'FLICKR', 'GOOGLE_DRIVE', 'BOX', 'PICASA']
}, {}, function(fpfiles) {
  var i, photos;
  photos = new Array();
  i = 0;
  while (i < fpfiles.length) {
    photos[i] = new Object();
    photos[i].url = fpfiles[i].url;
    i++;
  }
  return $.ajax({
    url: "/some/url",
    type: "POST",
    contentType: "application/json",
    data: JSON.stringify({
      photos: photos
    })
  }).always(function() {
    return location.reload();
  });
});

Upvotes: 0

Views: 682

Answers (1)

brettcvz
brettcvz

Reputation: 2381

This has been resolved and is no longer the case. Only one file link will be created and show up in your developer console. Thank you for the suggestion!

Upvotes: 1

Related Questions