转换Https

video_log
daiao 5 years ago
parent c04f57db05
commit c599717ed5

@ -9,6 +9,10 @@ class ApplicationService
content.gsub(regex, '')
end
def convert_https content
content.gsub("http:", "https:")
end
private
def strip(str)

@ -12,7 +12,7 @@ class Videos::DispatchCallbackService < ApplicationService
# TODO:: 拆分事件分发
case params['EventType']
when 'FileUploadComplete' then # 视频上传完成
video.file_url = params['FileUrl'].gsub("http:", "https:")
video.file_url = convert_https(params['FileUrl'])
video.filesize = params['Size']
video.upload_success
video.save!

Loading…
Cancel
Save