applicious_utils 0.1.90 → 0.1.91
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/applicious_utils/version.rb +1 -1
- data/lib/applicious_utils/view_helpers.rb +39 -39
- metadata +1 -1
@@ -43,47 +43,47 @@ module AppliciousUtils
|
|
43
43
|
out = ""
|
44
44
|
|
45
45
|
out << javascript_tag("$(function() {
|
46
|
+
|
47
|
+
/*
|
48
|
+
* S3 Uploader instance
|
49
|
+
*/
|
50
|
+
var applicious_uploader = new plupload.Uploader({
|
51
|
+
preinit : {
|
52
|
+
UploadFile: function(up, file) {
|
53
|
+
up.settings.multipart_params: {
|
54
|
+
'key': 'uploads/#{filename_token}.' + file.name.split('.').pop(),
|
55
|
+
'Filename': 'uploads/#{filename_token}.' + file.name.split('.').pop(), // adding this to keep consistency across the runtimes
|
56
|
+
},
|
57
|
+
}
|
58
|
+
},
|
59
|
+
|
60
|
+
|
61
|
+
runtimes : 'flash,silverlight',
|
62
|
+
browse_button : '#{options[:button_id]}',
|
63
|
+
max_file_size : '500mb',
|
64
|
+
url : 'http://#{bucket}.s3.amazonaws.com/',
|
65
|
+
flash_swf_url: '/applicious/plupload/plupload.flash.swf',
|
66
|
+
silverlight_xap_url: '/applicious/plupload/plupload.silverlight.xap',
|
67
|
+
multi_selection: false,
|
46
68
|
|
47
|
-
|
48
|
-
* S3 Uploader instance
|
49
|
-
*/
|
50
|
-
var applicious_uploader = new plupload.Uploader({
|
51
|
-
preinit : {
|
52
|
-
UploadFile: function(up, file) {
|
53
|
-
up.settings.multipart_params: {
|
54
|
-
'key': 'uploads/#{filename_token}.' + file.name.split('.').pop(),
|
55
|
-
'Filename': 'uploads/#{filename_token}.' + file.name.split('.').pop(), // adding this to keep consistency across the runtimes
|
56
|
-
},
|
57
|
-
}
|
58
|
-
},
|
69
|
+
//resize : {width : 320, height : 240, quality : 90},
|
59
70
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
'AWSAccessKeyId' : '#{access_key_id}',
|
77
|
-
'policy': '#{policy}',
|
78
|
-
'signature': '#{signature}'
|
79
|
-
},
|
80
|
-
filters : [
|
81
|
-
{title : '#{options[:filter_title]}', extensions : '#{options[:filter_extensions]}'}
|
82
|
-
],
|
83
|
-
file_data_name: 'file'
|
84
|
-
});
|
85
|
-
|
86
|
-
AP.Uploader.init( applicious_uploader, '#{filename_token}' )
|
71
|
+
multipart: true,
|
72
|
+
multipart_params: {
|
73
|
+
'acl': '#{options[:acl]}',
|
74
|
+
'Content-Type': '#{options[:content_type]}',
|
75
|
+
'success_action_status': '201',
|
76
|
+
'AWSAccessKeyId' : '#{access_key_id}',
|
77
|
+
'policy': '#{policy}',
|
78
|
+
'signature': '#{signature}'
|
79
|
+
},
|
80
|
+
filters : [
|
81
|
+
{title : '#{options[:filter_title]}', extensions : '#{options[:filter_extensions]}'}
|
82
|
+
],
|
83
|
+
file_data_name: 'file'
|
84
|
+
});
|
85
|
+
|
86
|
+
AP.Uploader.init( applicious_uploader, '#{filename_token}' )
|
87
87
|
});")
|
88
88
|
|
89
89
|
end
|