mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 19:24:10 +08:00
Fix file format bug (#1569)
This commit is contained in:
parent
b6480b04a9
commit
a0a3c4b97f
2 changed files with 2 additions and 7 deletions
|
@ -18,14 +18,8 @@
|
|||
});
|
||||
}
|
||||
|
||||
<<<<<<< HEAD:app/assets/javascripts/sitewide/file_preview.js.erb
|
||||
|
||||
function initImageEditor(data) {
|
||||
// var ImageEditor = require('tui-image-editor');
|
||||
=======
|
||||
function initImageEditor(data) {
|
||||
var imageEditor;
|
||||
>>>>>>> 50ccdbc6... Add workaround for image caching in fabric js [SCI-2855]:app/assets/javascripts/sitewide/file_preview.js
|
||||
var blackTheme = {
|
||||
'common.bi.image': '',
|
||||
'common.bisize.width': '0',
|
||||
|
|
|
@ -148,7 +148,8 @@ class AssetsController < ApplicationController
|
|||
@asset = Asset.find(params[:id])
|
||||
return render_403 unless can_read_team?(@asset.team)
|
||||
image_file = Paperclip.io_adapters.for(params[:image])
|
||||
image_file.original_filename = @asset.file_file_name
|
||||
image_format = image_file.content_type.split('/')[1]
|
||||
image_file.original_filename = @asset.file_file_name.ext(image_format)
|
||||
@asset.file = image_file
|
||||
@asset.save!
|
||||
# Post process file here
|
||||
|
|
Loading…
Reference in a new issue