From 160a5372785c96fba715704e1add97c82d9b6c58 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Sat, 20 Jul 2019 21:02:13 +0800 Subject: [PATCH] fix --- app/controllers/users/auth_attachments_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/users/auth_attachments_controller.rb b/app/controllers/users/auth_attachments_controller.rb index 86c3e70ef..98eff078f 100644 --- a/app/controllers/users/auth_attachments_controller.rb +++ b/app/controllers/users/auth_attachments_controller.rb @@ -1,8 +1,8 @@ class Users::AuthAttachmentsController < Users::BaseAccountController before_action :private_user_resources! - before_action :convert_image!, only: [:update] + before_action :convert_image!, only: [:create] - def update + def create image_temp_path = auth_image_path + 'temp' # 上传文件保存至临时文件,提交申请时再移到正常目录 File.delete(image_temp_path) if File.exist?(image_temp_path) # 删除之前的临时文件