Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitae904d3

Browse files
committed
fix(core): image data removal
1 parentb7c1518 commitae904d3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎src/controllers/main.js‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,9 @@ mainController.uploadFavicon = function (req, res) {
655655
}
656656

657657
if(!fs.existsSync(object.filePath))returnres.status(400).send('File failed to save to disk')
658+
if(path.extname(object.filename)==='.jpg'||path.extname(object.filename)==='.jpeg'){
659+
require('../helpers/utils').stripExifData(object.filePath)
660+
}
658661

659662
settingUtil.setSetting('gen:customfavicon',true,function(err){
660663
if(err)returnres.status(400).send('Failed to save setting to database')
@@ -727,6 +730,9 @@ mainController.uploadLogo = function (req, res) {
727730
}
728731

729732
if(!fs.existsSync(object.filePath))returnres.status(400).send('File failed to save to disk')
733+
if(path.extname(object.filename)==='.jpg'||path.extname(object.filename)==='.jpeg'){
734+
require('../helpers/utils').stripExifData(object.filePath)
735+
}
730736

731737
settingUtil.setSetting('gen:customlogo',true,function(err){
732738
if(err)returnres.status(400).send('Failed to save setting to database')
@@ -800,6 +806,9 @@ mainController.uploadPageLogo = function (req, res) {
800806
}
801807

802808
if(!fs.existsSync(object.filePath))returnres.status(400).send('File failed to save to disk')
809+
if(path.extname(object.filename)==='.jpg'||path.extname(object.filename)==='.jpeg'){
810+
require('../helpers/utils').stripExifData(object.filePath)
811+
}
803812

804813
settingUtil.setSetting('gen:custompagelogo',true,function(err){
805814
if(err)returnres.status(400).send('Failed to save setting to database')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp