applicious_utils 0.1.45 → 0.1.47
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.
@@ -77,8 +77,8 @@ module AppliciousUtils
|
|
77
77
|
multi_selection: false,
|
78
78
|
multipart: true,
|
79
79
|
multipart_params: {
|
80
|
-
'key': '
|
81
|
-
'Filename': '${filename}', // adding this to keep consistency across the runtimes
|
80
|
+
'key': 'uploads/#{SecureRandom.hex(10)}_#{Time.now.to_i}_${filename}',
|
81
|
+
'Filename': 'uploads/#{SecureRandom.hex(10)}_#{Time.now.to_i}_${filename}', // adding this to keep consistency across the runtimes
|
82
82
|
'acl': '#{options[:acl]}',
|
83
83
|
'Content-Type': '#{options[:content_type]}',
|
84
84
|
'success_action_status': '201',
|
@@ -92,31 +92,10 @@ module AppliciousUtils
|
|
92
92
|
file_data_name: 'file'
|
93
93
|
});
|
94
94
|
|
95
|
-
uploader.bind('FilesAdded', function(up, files) {
|
96
|
-
AP.log( up, files );
|
97
|
-
up.refresh(); // Reposition Flash/Silverlight
|
98
|
-
});
|
99
|
-
|
100
|
-
uploader.bind('UploadProgress', function(up, file) {
|
101
|
-
AP.log( up, file );
|
102
|
-
});
|
103
|
-
|
104
|
-
uploader.bind('Error', function(up, err) {
|
105
|
-
AP.log( up, err );
|
106
|
-
up.refresh(); // Reposition Flash/Silverlight
|
107
|
-
});
|
108
|
-
|
109
|
-
uploader.bind('FileUploaded', function(up, file) {
|
110
|
-
AP.log( up, file );
|
111
|
-
});
|
112
|
-
|
113
95
|
uploader.init();
|
114
96
|
AP.UPLOADER = uploader;
|
115
97
|
|
116
|
-
});
|
117
|
-
|
118
|
-
|
119
|
-
")
|
98
|
+
});")
|
120
99
|
|
121
100
|
end
|
122
101
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# # # # # # #
|
2
|
+
# Uploader #
|
3
|
+
# # # # # # #
|
4
|
+
$('#upload_file').click (e) ->
|
5
|
+
AP.UPLOADER.start()
|
6
|
+
e.preventDefault()
|
7
|
+
|
8
|
+
AP.UPLOADER.bind 'FilesAdded', (up, files) =>
|
9
|
+
AP.log( up, files )
|
10
|
+
up.refresh() # Reposition Flash/Silverlight
|
11
|
+
|
12
|
+
AP.UPLOADER.bind 'UploadProgress', (up, file) =>
|
13
|
+
AP.log( up, file )
|
14
|
+
|
15
|
+
AP.UPLOADER.bind 'FileUploaded', (up, file) =>
|
16
|
+
AP.log( up, file )
|
17
|
+
|
18
|
+
AP.UPLOADER.bind 'Error', (up, error) =>
|
19
|
+
AP.log( up, error )
|
20
|
+
up.refresh() # Reposition Flash/Silverlight
|
21
|
+
# - - - #
|
@@ -9,6 +9,7 @@ class UploaderGenerator < Rails::Generators::Base
|
|
9
9
|
template "amazon_s3.yml", "#{Rails.root}/config/amazon_s3.yml"
|
10
10
|
copy_file "../../../app/assets/javascripts/applicious_utils/Plupload/js/plupload.flash.swf", "public/applicious/plupload/plupload.flash.swf"
|
11
11
|
copy_file "../../../app/assets/javascripts/applicious_utils/Plupload/js/plupload.silverlight.xap", "public/applicious/plupload/plupload.silverlight.xap"
|
12
|
+
copy_file "applicious_uploader.js.coffee", "app/assets/javascripts/applicious_uploader.js.coffee"
|
12
13
|
copy_file "crossdomain.xml", "public/applicious/UPLOAD_TO_S3/crossdomain.xml"
|
13
14
|
copy_file "clientaccesspolicy.xml", "public/applicious/UPLOAD_TO_S3/clientaccesspolicy.xml"
|
14
15
|
|
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.
|
4
|
+
version: 0.1.47
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- lib/applicious_utils/view_helpers.rb
|
82
82
|
- lib/applicious_utils.rb
|
83
83
|
- lib/generators/templates/amazon_s3.yml
|
84
|
+
- lib/generators/templates/applicious_uploader.js.coffee
|
84
85
|
- lib/generators/templates/clientaccesspolicy.xml
|
85
86
|
- lib/generators/templates/crossdomain.xml
|
86
87
|
- lib/generators/templates/session_store.rb
|