FEATURE: Add base62 sha1 to cooked data attribute

* FEATURE: Add base62 sha1 to data attribute in `Post#cooked`.

* FIX: Use `Upload#short_url` when quoting an image.
This commit is contained in:
Guo Xiang Tan
2019-06-11 09:15:45 +08:00
committed by Sam
parent bd538f7437
commit 06d974d55c
6 changed files with 27 additions and 8 deletions

View File

@ -73,7 +73,8 @@ module PrettyText
short_urls.each do |short_url|
result[short_url] = {
url: url,
short_path: Upload.short_path(sha1: sha1, extension: extension)
short_path: Upload.short_path(sha1: sha1, extension: extension),
base62_sha1: Upload.base62_sha1(sha1)
}
end
end