Skip to content
This repository has been archived by the owner on Mar 1, 2018. It is now read-only.

Commit

Permalink
Merge pull request #194 from mkuron/copystream
Browse files Browse the repository at this point in the history
Use IO.copy_stream to copy the package to import.
  • Loading branch information
Ricky Chilcott committed Nov 12, 2013
2 parents d37c7b1 + e90d095 commit a406a16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/use_cases/process_package_upload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def retrieve_file_from_url(url)
package_file.tempfile.path = file.path

open(url) do |u|
file << u.read
IO.copy_stream(u,file)
file_url_path = u.base_uri.path if u.respond_to?(:base_uri)
file_url_path ||= URI.parse(url).path
package_file.original_filename = File.basename(file_url_path)
Expand Down

0 comments on commit a406a16

Please sign in to comment.