diff --git a/Gemfile b/Gemfile index ba02ce3..0d65d36 100644 --- a/Gemfile +++ b/Gemfile @@ -23,4 +23,7 @@ gem 'fog' #gem "image_science", :git => 'git://github.com/perezd/image_science.git' # MiniMagick -gem "mini_magick" \ No newline at end of file +gem "mini_magick" + +# Mini exif tool +gem "mini_exiftool" \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 59bbccd..d0e3af6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -60,6 +60,7 @@ GEM mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.16) + mini_exiftool (1.3.0) mini_magick (3.2) subexec (~> 0.0.4) net-ssh (2.0.23) @@ -103,6 +104,7 @@ DEPENDENCIES carrierwave! fog mime-types + mini_exiftool mini_magick pg rails (= 3.0.3) diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index cfb16ef..deca277 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -1,5 +1,4 @@ class PhotosController < ApplicationController -#skip_before_filter :verify_authenticity_token before_filter :check_public_access before_filter :require_role_admin, :only => [:untouched, :upload, :new, :create, :edit, :update, :destroy] @@ -75,6 +74,7 @@ class PhotosController < ApplicationController def create @photo = Photo.new(params[:photo]) + @photo.file = params[:file] respond_to do |format| if @photo.save format.html { render :text => "FILEID:" + @photo.file.album.url } diff --git a/app/views/photos/upload.html.erb b/app/views/photos/upload.html.erb index f6a5df4..512b7df 100644 --- a/app/views/photos/upload.html.erb +++ b/app/views/photos/upload.html.erb @@ -1,42 +1,85 @@ <% content_for :javascript do %> -<%= javascript_include_tag "uploadify-2.1/jquery.uploadify.v2.1.0.min.js" -%> -<%= javascript_include_tag "uploadify-2.1/swfobject.js" -%> + +<%= javascript_include_tag "plupload/js/plupload.full.min.js" -%> +<%= javascript_include_tag "plupload/js/jquery.plupload.queue.min.js" -%> <% end %> -
I'm really sorry, you need Flash to upload files.
- +
+

You browser doesn't have Flash, Silverlight, Gears, BrowserPlus or HTML5 support.

+
+