mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 01:44:34 +08:00
Merge pull request #2140 from biosistemika/revert-2139-ai-sci-fix-office-save
Revert "Force save office file"
This commit is contained in:
commit
53adea97ea
1 changed files with 1 additions and 2 deletions
|
@ -396,8 +396,7 @@ class Asset < ApplicationRecord
|
|||
end
|
||||
|
||||
def update_contents(new_file)
|
||||
to_blob = ActiveStorage::Blob.create_after_upload!(io: new_file, filename: file_name)
|
||||
file.attach(to_blob)
|
||||
file.attach(io: new_file, filename: file_name)
|
||||
self.version = version.nil? ? 1 : version + 1
|
||||
save
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue