This repository was archived by the owner on Mar 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-14
lines changed
app/directives/tc-fp-file-input Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -54,12 +54,19 @@ import _ from 'lodash'
5454 scope . onSuccess ( event . originalEvent || event )
5555 $rootScope . $apply ( )
5656 } )
57- element = element . length ? element [ 0 ] : element
58- for ( key in attrs . $attr ) {
59- value = attrs . $attr [ key ]
60- element . setAttribute ( value , attrs [ key ] )
61- }
62- filepickerService . constructWidget ( element )
57+
58+ var input = element . find ( 'input' )
59+ input = input . length ? input [ 0 ] : input
60+ input . setAttribute ( 'data-fp-maxSize' , scope . maxSize )
61+ input . setAttribute ( 'data-fp-services' , scope . fpServices )
62+ input . setAttribute ( 'data-fp-button-class' , 'tc-btn' )
63+ input . setAttribute ( 'data-fp-multiple' , false )
64+ input . setAttribute ( 'data-fp-extensions' , scope . extensions )
65+ input . setAttribute ( 'data-fp-store-location' , 's3' )
66+ input . setAttribute ( 'data-fp-store-container' , scope . fpContainer )
67+ input . setAttribute ( 'data-fp-store-path' , scope . filePath )
68+
69+ filepickerService . constructWidget ( input )
6370
6471 scope . onSuccess = function ( event ) {
6572 var fpFile = event . fpfile
Original file line number Diff line number Diff line change 77 span.tc-label__asterisk.lowercase ( ng-if ="mandatory" ) #[ span *] mandatory
88 input.tc-file-field__input (
99 type ="filepicker-dragdrop" ,
10- data-fp-maxSize ="{{maxSize}}" ,
11- data-fp-button-class ="tc-btn" ,
12- data-fp-services ="{{fpServices}}" ,
13- data-fp-multiple ="false" ,
14- data-fp-extensions ="{{extensions}}" ,
15- data-fp-store-location ="s3" ,
16- data-fp-store-container ="{{fpContainer}}" ,
17- data-fp-store-path ="{{filePath}}" ,
1810 on-success ="onFileSeleted(event.fpfile)"
1911 )
You can’t perform that action at this time.
0 commit comments