Official Ruby on Rails plugin for Filestack File Picker that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
None of the filepicker callbacks from the new JS SDK are available other than the onUploadDone.
the following code will raise exception about onOpen value is not in of proper type.
it excepts a function, but receives a string instead.
<%= f.filestack_field :storage_url, 'Pick a file', pickerOptions: { onOpen: 'myOpenCallback', fromSources: TranscriptionJob::FILE_SOURCES, storeTo: { location: 's3', path: TranscriptionJob::ORIGINALS_STORAGE_PATH }, maxFiles: UploadTranscriptionJobsOperation::MAX_FILES}, callback: '$(".pick_file_metadata").val(JSON.stringify(data.filesUploaded)); $("#language").modal("toggle");', multiple: true, class: "pick_file" %>
More over both elements should support event listening for callbacks instead of using the mandatory 'callback' argument.
instead of:
filestack_picker_element 'Pick a file', "myCallback", class: 'file-picker', pickerOptions: { someoptions}}
i should be able to use javascript event listening:
$('.file-picker').on('onUploadDone', mycallback)$('.file-picker').on('onOpen', mycallback2)
None of the filepicker callbacks from the new JS SDK are available other than the
onUploadDone
.the following code will raise exception about onOpen value is not in of proper type. it excepts a function, but receives a string instead.
<%= f.filestack_field :storage_url, 'Pick a file', pickerOptions: { onOpen: 'myOpenCallback', fromSources: TranscriptionJob::FILE_SOURCES, storeTo: { location: 's3', path: TranscriptionJob::ORIGINALS_STORAGE_PATH }, maxFiles: UploadTranscriptionJobsOperation::MAX_FILES}, callback: '$(".pick_file_metadata").val(JSON.stringify(data.filesUploaded)); $("#language").modal("toggle");', multiple: true, class: "pick_file" %>
More over both elements should support event listening for callbacks instead of using the mandatory 'callback' argument. instead of:
filestack_picker_element 'Pick a file', "myCallback", class: 'file-picker', pickerOptions: { someoptions}}
i should be able to use javascript event listening:
$('.file-picker').on('onUploadDone', mycallback)
$('.file-picker').on('onOpen', mycallback2)