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) # 删除之前的临时文件