5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 19:41:42 +00:00

fix: actualizar la información y guardar la url #12971

para evitar que falle el trabajo de análisis
This commit is contained in:
f 2023-04-07 14:24:47 -03:00
parent 30a70e9308
commit 0cc36f2a1b

View file

@ -28,7 +28,9 @@ module ActiveStorage
begin
url = request.body.read
body = Down.download(url, max_size: 111.megabytes)
checksum = nil
checksum = Digest::MD5.file(body.path).base64digest
blob.metadata[:url] = url
blob.update_columns checksum: checksum, byte_size: body.size, metadata: blob.metadata
rescue StandardError => e
ExceptionNotifier.notify_exception(e, data: { key: token[:key], url: url, site: site.name })