applicious_utils 0.1.76 → 0.1.77

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.
@@ -1,3 +1,3 @@
1
1
  module AppliciousUtils
2
- VERSION = "0.1.76"
2
+ VERSION = "0.1.77"
3
3
  end
@@ -43,6 +43,12 @@ module AppliciousUtils
43
43
  out = ""
44
44
 
45
45
  out << javascript_tag("$(function() {
46
+
47
+ function appliciousGetFileExtension(filename)
48
+ {
49
+ var ext = /^.+\.([^.]+)$/.exec(filename);
50
+ return ext == null ? "" : ext[1];
51
+ }
46
52
 
47
53
  /*
48
54
  * S3 Uploader instance
@@ -61,8 +67,8 @@ module AppliciousUtils
61
67
  multi_selection: false,
62
68
  multipart: true,
63
69
  multipart_params: {
64
- 'key': 'uploads/#{filename_token}',
65
- 'Filename': 'uploads/#{filename_token}', // adding this to keep consistency across the runtimes
70
+ 'key': 'uploads/#{filename_token}' + appliciousGetFileExtension( ${filename} ),
71
+ 'Filename': 'uploads/#{filename_token}' + appliciousGetFileExtension( ${filename} ), // adding this to keep consistency across the runtimes
66
72
  'acl': '#{options[:acl]}',
67
73
  'Content-Type': '#{options[:content_type]}',
68
74
  'success_action_status': '201',
@@ -12,6 +12,7 @@ root.appliciousUploaderUploadProgress = (up, file) ->
12
12
 
13
13
  root.appliciousUploaderFileUploaded = (up, file) ->
14
14
  AP.log 'Called'
15
+ #token = AP.Uploader.FileToken
15
16
 
16
17
  root.appliciousUploaderError = (up, error) ->
17
18
  AP.log 'Called'
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.76
4
+ version: 0.1.77
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: