We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem seems to be in the upload.rb (ramaze/helper/upload.rb) @realfile = File.new(path) #--->this opens the uploaded/saved file, thus locking it
I patched my local copy of upload.rb with this --
# Saved file object # @return [File] attr_reader :realfile #---> expose the variable so we can close it from the caller
And then in your caller, simply close the file after you save it, like so..
get_uploaded_files.each_pair{|k, v| v.save "upload/#{v.filename}" v.realfile.close #close the file handle }
Ruby 1.93 Ramaze-2012.04.14 Rack-1.4.1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Problem seems to be in the upload.rb (ramaze/helper/upload.rb)
@realfile = File.new(path) #--->this opens the uploaded/saved file, thus locking it
I patched my local copy of upload.rb with this --
And then in your caller, simply close the file after you save it, like so..
get_uploaded_files.each_pair{|k, v|
v.save "upload/#{v.filename}"
v.realfile.close #close the file handle
}
Ruby 1.93
Ramaze-2012.04.14
Rack-1.4.1
The text was updated successfully, but these errors were encountered: