mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 10:26:21 +00:00
tener en cuenta que los archivos pueden estar vacíos
This commit is contained in:
parent
82e676e161
commit
17bbee47aa
1 changed files with 3 additions and 1 deletions
|
@ -80,8 +80,10 @@ class MetadataFile < MetadataTemplate
|
|||
|
||||
# Obtiene la ruta absoluta del archivo
|
||||
#
|
||||
# @return [String]
|
||||
# @return [String|Nil]
|
||||
def file
|
||||
return unless value['path']
|
||||
|
||||
if value['path'].is_a? ActionDispatch::Http::UploadedFile
|
||||
value['path'].tempfile.path
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue