I'm trying to upload a .zip file and then parse it using rubyzip:
def upload
require 'zip'
@file = params[:software].tempfile
Zip::File.open(@file.path) do |zipfile|
#Parse file...
end
end
I can't do this, I get a File not found error at Zip::File.open
. I assume the problem is that when the user uploads the file it gets sent to the Windows Temp folder, and I my application can't get to it.
If I copy this .zip file to the inside of my folder I can access it just fine, but I don't want to do it this way for safety reasons.