This commit is contained in:
Bofh 2021-11-16 23:51:48 +01:00
commit ce9ab0827f
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
name: Build container image name: Build container image
on: on:
workflow_dispatch:
push: push:
branches: branches:
- "main" - "main"

View File

@ -17,9 +17,9 @@ module Paperclip
def cache_current_values def cache_current_values
@original_filename = filename_from_content_disposition.presence || filename_from_path.presence || 'data' @original_filename = filename_from_content_disposition.presence || filename_from_path.presence || 'data'
@size = @target.response.content_length
@tempfile = copy_to_tempfile(@target) @tempfile = copy_to_tempfile(@target)
@content_type = ContentTypeDetector.new(@tempfile.path).detect @content_type = ContentTypeDetector.new(@tempfile.path).detect
@size = File.size(@tempfile)
end end
def copy_to_tempfile(source) def copy_to_tempfile(source)