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)
|
||||
return nil if zipfile.blank?
|
||||
|
||||
file = CarrierWave::SanitizedFile.new(zipfile)
|
||||
|
||||
uploader = self.get_uploader(@site)
|
||||
|
||||
begin
|
||||
if zipfile.is_a?(String) && zipfile =~ /^http:\/\//
|
||||
uploader.download!(zipfile)
|
||||
uploader.store!
|
||||
else
|
||||
file = CarrierWave::SanitizedFile.new(zipfile)
|
||||
uploader.store!(file)
|
||||
end
|
||||
uploader.identifier
|
||||
rescue CarrierWave::IntegrityError
|
||||
nil
|
||||
|
Loading…
Reference in New Issue
Block a user