Fix file format bug (#1569)

This commit is contained in:
aignatov-bio 2019-03-19 11:06:36 +01:00 committed by GitHub
parent b6480b04a9
commit a0a3c4b97f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 7 deletions

View file

@ -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',

View file

@ -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