This repository was archived by the owner on Mar 4, 2025. It is now read-only.
File tree 2 files changed +13
-14
lines changed
app/directives/tc-fp-file-input 2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -54,12 +54,19 @@ import _ from 'lodash'
54
54
scope . onSuccess ( event . originalEvent || event )
55
55
$rootScope . $apply ( )
56
56
} )
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 )
63
70
64
71
scope . onSuccess = function ( event ) {
65
72
var fpFile = event . fpfile
Original file line number Diff line number Diff line change 7
7
span.tc-label__asterisk.lowercase ( ng-if ="mandatory" ) #[ span *] mandatory
8
8
input.tc-file-field__input (
9
9
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}}" ,
18
10
on-success ="onFileSeleted(event.fpfile)"
19
11
)
You can’t perform that action at this time.
0 commit comments