filestack-rails icon indicating copy to clipboard operation
filestack-rails copied to clipboard

picker.js:1 Uncaught (in promise) TypeError: n is not a function at picker.js:1

Open kopchickm opened this issue 3 years ago • 1 comments

This is happening maybe 10% of time when uploading multiple images via the filestack picker.

The offending JS appears to be:

var r=n({tile:200});

Which could be in the resizing code, but since it's minified, it's hard to tell :) I can't find a single cause for the bug occuring - it seems to happen irrespective of file size or number of files.

I'm loading filestack in the

via:
<%= filestack_js_include_tag %>
<%= filestack_js_init_tag %>

And my uploader is using filestack_picker_element with the following options:

pickerOptions: {
  accept: 'image/*',
  fromSources: ['local_file_system'],
  storeTo: {
    location: "gcs",
    container: ENV["cloud_storage_bucket"],
    path: "images/#{model_id}/#{key}/"
  },
  maxFiles: max_files,
  imageMax: [1024, 728]
},
id: "fp-#{model}-#{key}"

Thanks!

kopchickm avatar May 02 '21 15:05 kopchickm

It looks like setting concurrency to 1 fixes the issue, if that helps.

kopchickm avatar May 13 '21 15:05 kopchickm