Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit dc1a867

Browse files
author
Gabi Fijalkowska-Papier
authored
Merge pull request #236 from filestack/improvement/upload-multiple-images
Support for uploading multiple images
2 parents 72e4262 + 4ebf769 commit dc1a867

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ You can also generate a new security object at any time, although this will only
119119
This is a generic button that can be added anywhere in your application and opens an instance of the File Picker. Once a user has chosen a file(s) and submitted, a callback will be executed, passing in the results. You can also pass in any options for the File Picker using the `pickerOptions` symbol:
120120

121121
```erb
122-
<%= filestack_picker_element 'button test', 'callbackForButton', id: 'someuniqueid', input_id: 'someuniqueinputid', pickerOptions: { 'fromSources' => 'facebook' } %>
122+
<%= filestack_picker_element 'button test', 'callbackForButton', id: 'someuniqueid', input_id: 'someuniqueinputid', pickerOptions: { 'fromSources' => 'facebook', 'maxFiles': 50 } %>
123123
```
124124
File Picker options are exactly the same as in the Javscript SDK and can be found in the aforementioned documentation.
125125

‎app/helpers/filestack_rails/form_helper.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def get_filestack_field_button(method, content, options = {})
1717

1818
form_field_callback_guts = 'const filestack_input_field' \
1919
"= document.getElementById('#{input_options[:id]}');" \
20-
'filestack_input_field.value = data.filesUploaded[0].url;'
20+
'filestack_input_field.value = data.filesUploaded.map(e => e.url);'
2121

2222
unless user_callback.nil?
2323
form_field_callback_guts = "#{form_field_callback_guts}#{user_callback}(data)"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /