carrierwave-roz 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/carrierwave/storage/roz.rb +5 -2
- data/lib/carrierwave_roz/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3ec3a0388baa39783f30de6e8585e67ed91fcd9
|
4
|
+
data.tar.gz: fcd82850422ddbf883bc4deef4d7bd2c7db561a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e43144f24a1fbd94f7fb30f03f96147b8893c73528a45c14ebeefd173cfee197cef5c795e1acf859853f4fab7235a4cad77f7a7498cf13ad8f38d30b614c97b
|
7
|
+
data.tar.gz: af60c2ea45e9fd4c858a182a4cf56175b9b2adb3381781769ff329d855ec76f7e27043ad3d6259b3a06156a03f410f178dbd370c96d8c775fba35e35bc301504
|
@@ -5,7 +5,8 @@ module CarrierWave
|
|
5
5
|
module Storage
|
6
6
|
class Roz < Abstract
|
7
7
|
def identifier
|
8
|
-
|
8
|
+
full_filename = [uploader.version_name, uploader.filename].compact.join('_')
|
9
|
+
::File.join(*[uploader.access_id, uploader.store_dir, full_filename].map(&:to_s))
|
9
10
|
end
|
10
11
|
|
11
12
|
def store!(file)
|
@@ -43,7 +44,9 @@ module CarrierWave
|
|
43
44
|
# Backwards compatibility for when we were storing only the filename
|
44
45
|
URI.join(uploader.files_base_url, "#{uploader.access_id.to_s}/", "#{uploader.store_dir}/", path).to_s
|
45
46
|
else
|
46
|
-
|
47
|
+
dirname = ::File.dirname(path)
|
48
|
+
basename = [uploader.version_name, ::File.basename(path)].compact.join('_')
|
49
|
+
URI.join(uploader.files_base_url, "#{dirname}/", basename).to_s
|
47
50
|
end
|
48
51
|
end
|
49
52
|
|