Skip to content

Commit

Permalink
Merge a29d1cb into 7b67893
Browse files Browse the repository at this point in the history
  • Loading branch information
gabifija committed Jul 4, 2019
2 parents 7b67893 + a29d1cb commit bbb76d3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
14 changes: 13 additions & 1 deletion spec/dummy/app/assets/javascripts/hello.js
Expand Up @@ -4,4 +4,16 @@ console.log(rich_client);

function logIt(data){
console.log(data.filesUploaded[0].url)
}
}

function onDoneCallback() {
console.log('onDoneCallback');
}

function onCloseCallback() {
console.log('onCloseCallback');
}

function onFileUploadFinishedCallback(data) {
console.log(data);
}
2 changes: 1 addition & 1 deletion spec/dummy/app/views/hello/index.html.erb
Expand Up @@ -6,7 +6,7 @@
<h2>Example of Filestack Form Field</h2>
<%= form_for @user do |f| %>
<%= f.label :picture %>
<%= f.filestack_field :picture, 'Upload a Picture', pickerOptions: {'accept' => 'image/*' } %>
<%= f.filestack_field :picture, 'Upload a Picture', pickerOptions: {'accept' => 'image/*', onFileUploadFinished: 'onFileUploadFinishedCallback' } %>
<br />
<%= f.submit %>
<% end %>
3 changes: 3 additions & 0 deletions spec/dummy/config/application.rb
Expand Up @@ -12,6 +12,9 @@ class Application < Rails::Application
config.assets.compile = true
config.filestack_rails.api_key = 'API_KEY'
config.filestack_rails.client_name = 'rich_client'
# config.filestack_rails.version = 'v3'
# config.filestack_rails.app_secret = '22VXWDDDDDDQXBJA63X637JLIA'
# config.filestack_rails.security = {call: %w[read store pick stat write writeUrl convert remove exif], expiry: 60}

# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
Expand Down

0 comments on commit bbb76d3

Please sign in to comment.