Skip to content

Commit

Permalink
Add support of remote file
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian95 committed Dec 8, 2011
1 parent 14e5a8a commit 34a8a2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/gdata/client/base.rb
Expand Up @@ -50,10 +50,10 @@ def initialize(options = {})

# Sends an HTTP request with the given file as a stream
def make_file_request(method, url, file_path, mime_type, entry = nil)
if not File.readable?(file_path)
if not File.readable?(open(file_path))
raise ArgumentError, "File #{file_path} is not readable."
end
file = File.open(file_path, 'rb')
file = File.open(open(file_path), 'rb')
@headers['Slug'] = File.basename(file_path)
if entry
@headers['MIME-Version'] = '1.0'
Expand Down

0 comments on commit 34a8a2d

Please sign in to comment.