Replace snapshot attach_files

pull/9686/head
Oliver Günther 3 years ago
parent 5f44166ad9
commit 7c25932f94
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 5
      modules/bim/app/models/bim/bcf/viewpoint.rb

@ -41,7 +41,10 @@ module Bim::Bcf
def snapshot=(file)
snapshot&.destroy
attach_files('first' => { 'file' => file, 'description' => 'snapshot' })
Attachments::CreateService
.new(user: User.current)
.call(file: file, container: self, filename: file.original_filename, description: 'snapshot')
.result
end
end
end

Loading…
Cancel
Save