plupload-rails3 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -1
- data/README.md +3 -0
- data/lib/app/controllers/plupload_rails_controller.rb +1 -0
- data/lib/plupload-rails3/version.rb +1 -1
- metadata +2 -2
data/.gitignore
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
*.DS_Store
|
1
|
+
*.DS_Store
|
2
|
+
*.gem
|
data/README.md
CHANGED
@@ -74,6 +74,9 @@ Also in the view, you'll need to tell it where to go:
|
|
74
74
|
@library_file should be your model, where :payload is the method which holds the file contents, so that when plupload uploads the files (it hits #create once for each file) it will put the uploaded file in params[:library_file][:payload] which you can then read like this in your controller:
|
75
75
|
|
76
76
|
params[:library_file][:payload] = params[:library_file][:payload].read
|
77
|
+
# Note: there is no need to do this with libraries that expect an instance of
|
78
|
+
# UplodedFile as opposed to the contents. For example, with CarrierWave, leave
|
79
|
+
# this line out.
|
77
80
|
|
78
81
|
Then if you're storing it in the DB, you let it continue on to
|
79
82
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
class PluploadRailsController < ActionController::Base
|
2
2
|
def _plupload_uploader
|
3
3
|
plupload_temp_path = "tmp/plupload-rails3/#{File.basename(params[:file].tempfile.path)}"
|
4
|
+
params[:file].tempfile.close unless params[:file].tempfile.closed?
|
4
5
|
FileUtils.mv(params[:file].tempfile, plupload_temp_path)
|
5
6
|
add_fields_for_files_to_forms =<<END
|
6
7
|
function _pluploadRails_addFieldsForFilesToForms(){
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plupload-rails3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
12
|
+
date: 2011-10-25 00:00:00.000000000Z
|
13
13
|
dependencies: []
|
14
14
|
description: ''
|
15
15
|
email:
|