app/models/lolita/upload/file.rb in lolita-file-upload-0.2.6 vs app/models/lolita/upload/file.rb in lolita-file-upload-0.2.7

- old
+ new

@@ -30,12 +30,14 @@ end end end def set_metadata - self.name||=::File.basename(self.asset.store_path) - self.asset_size=self.asset.file.size - self.asset_extension=::File.extname(self.asset.store_path).gsub(".","") + unless self.asset.blank? + self.name||=::File.basename(self.asset.store_path) + self.asset_size=self.asset.file.size + self.asset_extension=::File.extname(self.asset.store_path).gsub(".","") + end end end end end