mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-23 00:56:22 +00:00
Merge branch 'usar-sutty-editor' into panel.sutty.nl
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
commit
8e900084f2
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