rails_uploads 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rails_uploads/types/file.rb +8 -8
- data/lib/rails_uploads/version.rb +1 -1
- metadata +1 -1
@@ -28,15 +28,19 @@ module RailsUploads
|
|
28
28
|
def is_default?
|
29
29
|
@default
|
30
30
|
end
|
31
|
+
|
32
|
+
def is_stored?
|
33
|
+
@stored
|
34
|
+
end
|
35
|
+
|
36
|
+
def is_deleted?
|
37
|
+
@deleted
|
38
|
+
end
|
31
39
|
|
32
40
|
def exists?(*args)
|
33
41
|
return false if is_deleted?
|
34
42
|
storage.exists? path(*args)
|
35
43
|
end
|
36
|
-
|
37
|
-
def is_deleted?
|
38
|
-
@deleted
|
39
|
-
end
|
40
44
|
|
41
45
|
def size(*args)
|
42
46
|
return 0 if is_deleted?
|
@@ -98,10 +102,6 @@ module RailsUploads
|
|
98
102
|
@upload != false
|
99
103
|
end
|
100
104
|
|
101
|
-
def is_stored?
|
102
|
-
@stored
|
103
|
-
end
|
104
|
-
|
105
105
|
def destination_path(*args)
|
106
106
|
::File.join 'uploads', store_path(*args), filename
|
107
107
|
end
|