import theme from the rails console is now possible
This commit is contained in:
parent
6ac4ff0393
commit
0be4c93924
@ -91,12 +91,16 @@ module Locomotive
|
|||||||
def store_zipfile(zipfile)
|
def store_zipfile(zipfile)
|
||||||
return nil if zipfile.blank?
|
return nil if zipfile.blank?
|
||||||
|
|
||||||
file = CarrierWave::SanitizedFile.new(zipfile)
|
|
||||||
|
|
||||||
uploader = self.get_uploader(@site)
|
uploader = self.get_uploader(@site)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
uploader.store!(file)
|
if zipfile.is_a?(String) && zipfile =~ /^http:\/\//
|
||||||
|
uploader.download!(zipfile)
|
||||||
|
uploader.store!
|
||||||
|
else
|
||||||
|
file = CarrierWave::SanitizedFile.new(zipfile)
|
||||||
|
uploader.store!(file)
|
||||||
|
end
|
||||||
uploader.identifier
|
uploader.identifier
|
||||||
rescue CarrierWave::IntegrityError
|
rescue CarrierWave::IntegrityError
|
||||||
nil
|
nil
|
||||||
|
Loading…
Reference in New Issue
Block a user