applicious_utils 0.1.81 → 0.1.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/applicious_utils/version.rb +1 -1
- data/lib/applicious_utils/view_helpers.rb +11 -10
- metadata +1 -1
@@ -44,35 +44,36 @@ module AppliciousUtils
|
|
44
44
|
|
45
45
|
out << javascript_tag("$(function() {
|
46
46
|
|
47
|
-
//function appliciousGetFileExtension(filename)
|
48
|
-
//{
|
49
|
-
// return filename.split('.').pop();
|
50
|
-
//}
|
51
|
-
//extension = appliciousGetFileExtension()
|
52
|
-
|
53
47
|
/*
|
54
48
|
* S3 Uploader instance
|
55
49
|
*/
|
56
50
|
// image uploader via plupload
|
57
51
|
var applicious_uploader = new plupload.Uploader({
|
52
|
+
preinit : {
|
53
|
+
UploadFile: function(up, file) {
|
54
|
+
up.settings.multipart_params.key = '#{filename_token}_' + file.name.split('.').pop();
|
55
|
+
}
|
56
|
+
},
|
57
|
+
|
58
|
+
|
58
59
|
runtimes : 'flash,silverlight',
|
59
60
|
browse_button : '#{options[:button_id]}',
|
60
61
|
max_file_size : '500mb',
|
61
62
|
url : 'http://#{bucket}.s3.amazonaws.com/',
|
62
63
|
flash_swf_url: '/applicious/plupload/plupload.flash.swf',
|
63
64
|
silverlight_xap_url: '/applicious/plupload/plupload.silverlight.xap',
|
65
|
+
multi_selection: false,
|
64
66
|
|
65
67
|
//resize : {width : 320, height : 240, quality : 90},
|
66
68
|
|
67
|
-
multi_selection: false,
|
68
69
|
multipart: true,
|
69
70
|
multipart_params: {
|
70
|
-
'key': 'uploads/#{filename_token}_${filename}',
|
71
|
-
'Filename': 'uploads/#{filename_token}_${filename}', // adding this to keep consistency across the runtimes
|
71
|
+
//'key': 'uploads/#{filename_token}_${filename}',
|
72
|
+
//'Filename': 'uploads/#{filename_token}_${filename}', // adding this to keep consistency across the runtimes
|
72
73
|
'acl': '#{options[:acl]}',
|
73
74
|
'Content-Type': '#{options[:content_type]}',
|
74
75
|
'success_action_status': '201',
|
75
|
-
'AWSAccessKeyId' : '#{access_key_id}',
|
76
|
+
'AWSAccessKeyId' : '#{access_key_id}',
|
76
77
|
'policy': '#{policy}',
|
77
78
|
'signature': '#{signature}'
|
78
79
|
},
|