mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 21:41:41 +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:
parent
30a70e9308
commit
0cc36f2a1b
1 changed files with 3 additions and 1 deletions
|
@ -28,7 +28,9 @@ module ActiveStorage
|
||||||
begin
|
begin
|
||||||
url = request.body.read
|
url = request.body.read
|
||||||
body = Down.download(url, max_size: 111.megabytes)
|
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
|
rescue StandardError => e
|
||||||
ExceptionNotifier.notify_exception(e, data: { key: token[:key], url: url, site: site.name })
|
ExceptionNotifier.notify_exception(e, data: { key: token[:key], url: url, site: site.name })
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue