carrierwave-google_drive 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require "google_drive"
|
3
|
+
require "open-uri"
|
3
4
|
|
4
5
|
module CarrierWave
|
5
6
|
module Storage
|
@@ -59,6 +60,10 @@ module CarrierWave
|
|
59
60
|
"https://docs.google.com/uc?&id=#{@resource_id}"
|
60
61
|
end
|
61
62
|
|
63
|
+
def read
|
64
|
+
open(url).read
|
65
|
+
end
|
66
|
+
|
62
67
|
private
|
63
68
|
def file
|
64
69
|
@file || begin
|