|
|
@ -1,8 +1,8 @@
|
|
|
|
class Users::AuthAttachmentsController < Users::BaseAccountController
|
|
|
|
class Users::AuthAttachmentsController < Users::BaseAccountController
|
|
|
|
before_action :private_user_resources!
|
|
|
|
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' # 上传文件保存至临时文件,提交申请时再移到正常目录
|
|
|
|
image_temp_path = auth_image_path + 'temp' # 上传文件保存至临时文件,提交申请时再移到正常目录
|
|
|
|
|
|
|
|
|
|
|
|
File.delete(image_temp_path) if File.exist?(image_temp_path) # 删除之前的临时文件
|
|
|
|
File.delete(image_temp_path) if File.exist?(image_temp_path) # 删除之前的临时文件
|
|
|
|