blob: d04e613bf6e8cc448832d0bd53fe9b11e1724f8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# Copyright (C) 2024-2026 Maria Lisina
# Copyright (C) 2024-2026 Danil Lisin
# SPDX-License-Identifier: Apache-2.0
ib_file_size="$(jq -r ".${ib_iarray}[0].${ib_isize}" "${ib_file}")"
ib_file_url="$(jq -r ".${ib_iarray}[0].${ib_ifile}" "${ib_file}")"
source "${units}/ib_size.zsh"
if [[ -n "${ib_file_url}" && "${ib_file_url}" != "null" ]]
then
ib_sample_url="$(jq -r ".${ib_iarray}[0].${ib_isample}" "${ib_file}")"
ib_preview_url="$(jq -r ".${ib_iarray}[0].${ib_ipreview}" "${ib_file}")"
ib_width="$(jq -r ".${ib_iarray}[0].${ib_iwidth}" "${ib_file}")"
ib_height="$(jq -r ".${ib_iarray}[0].${ib_iheight}" "${ib_file}")"
source "${units}/ib_meta.zsh"
else
output_text="No original file found"
return
fi
if [[ -n "${ib_file_size}" && "${ib_file_size}" != "null" && ${ib_file_size} -gt 0 ]]
then
if [[ ${ib_file_size} -gt 20971520 ]]
then
output_text="File size is too large"
fi
else
output_text="Failed to get file size"
fi
|