* fixed Issue 119: Critical-dmsf crash when trying upload a file with empty title
* fixed Issue 120: dmsf website is 'https://code.google.com/p/redmine-dmsf/?? git-svn-id: http://redmine-dmsf.googlecode.com/svn/trunk/redmine_dmsf@206 5e329b0b-a2ee-ea63-e329-299493fc886d
This commit is contained in:
parent
02b143848c
commit
bb359ceec4
@ -47,6 +47,10 @@ class DmsfUploadController < ApplicationController
|
|||||||
# async single file upload handling
|
# async single file upload handling
|
||||||
def upload_file
|
def upload_file
|
||||||
@tempfile = params[:file]
|
@tempfile = params[:file]
|
||||||
|
unless @tempfile.original_filename
|
||||||
|
render_404
|
||||||
|
return
|
||||||
|
end
|
||||||
@disk_filename = DmsfHelper.temp_filename(@tempfile.original_filename)
|
@disk_filename = DmsfHelper.temp_filename(@tempfile.original_filename)
|
||||||
File.open("#{DmsfHelper.temp_dir}/#{@disk_filename}", "wb") do |f|
|
File.open("#{DmsfHelper.temp_dir}/#{@disk_filename}", "wb") do |f|
|
||||||
while (buffer = @tempfile.read(8192))
|
while (buffer = @tempfile.read(8192))
|
||||||
|
|||||||
2
init.rb
2
init.rb
@ -30,7 +30,7 @@ Redmine::Plugin.register :redmine_dmsf do
|
|||||||
author "Vít Jonáš"
|
author "Vít Jonáš"
|
||||||
description "Document Management System Features"
|
description "Document Management System Features"
|
||||||
version "1.0.0 dev"
|
version "1.0.0 dev"
|
||||||
url "https://code.google.com/p/redmine-dmsf/"
|
url "http://code.google.com/p/redmine-dmsf/"
|
||||||
author_url "mailto:vit.jonas@gmail.com"
|
author_url "mailto:vit.jonas@gmail.com"
|
||||||
|
|
||||||
requires_redmine :version_or_higher => '1.1.0'
|
requires_redmine :version_or_higher => '1.1.0'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user