mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-24 08:46:22 +00:00
Merge branch 'jekyll-service' into panel.sutty.nl
This commit is contained in:
commit
a043d12533
1 changed files with 12 additions and 0 deletions
|
@ -20,6 +20,18 @@ module ActiveStorage
|
|||
end
|
||||
end
|
||||
|
||||
# Solo copiamos el archivo si no existe
|
||||
#
|
||||
# @param :key [String]
|
||||
# @param :io [IO]
|
||||
# @param :checksum [String]
|
||||
def upload(key, io, checksum: nil, **)
|
||||
instrument :upload, key: key, checksum: checksum do
|
||||
IO.copy_stream(io, make_path_for(key)) unless exist?(key)
|
||||
ensure_integrity_of(key, checksum) if checksum
|
||||
end
|
||||
end
|
||||
|
||||
# Lo mismo que en DiskService agregando el nombre de archivo en la
|
||||
# firma. Esto permite que luego podamos guardar el archivo donde
|
||||
# corresponde.
|
||||
|
|
Loading…
Reference in a new issue