applicious_utils 0.1.81 → 0.1.82

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module AppliciousUtils
2
- VERSION = "0.1.81"
2
+ VERSION = "0.1.82"
3
3
  end
@@ -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
  },
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: applicious_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.81
4
+ version: 0.1.82
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: