Skip to content

Commit

Permalink
Fixes CKEditor file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric de Villamil committed Mar 16, 2012
1 parent a1e70bb commit 9272674
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -95,6 +95,7 @@ def create_folder
def upload_file
begin
load_file_from_params

Resource.create(:filename => @new_file.original_filename, :mime => @ftype, :created_at => Time.now)
copy_tmp_file(@new_file) if mime_types_ok(@ftype)
rescue => e
Expand Down Expand Up @@ -207,7 +208,7 @@ def uploaded_file_path
#
def check_file(file)
log "CKEDITOR ---- CLASS OF UPLOAD OBJECT: #{file.class}"
unless [Tempfile, StringIO].include? file.class
unless [Tempfile, StringIO, ActionDispatch::Http::UploadedFile].include? file.class
@errorNumber = 403
throw Exception.new
end
Expand Down

0 comments on commit 9272674

Please sign in to comment.