ThumbnailExt returns the file extension for a thumbnail encoded in `format`. Used to build a synthetic filename for the derived row (parent's basename + variant + extension) so downloads with Content-Disposition expose a sensible filename.
(format string)
| 154 | // (parent's basename + variant + extension) so downloads with |
| 155 | // Content-Disposition expose a sensible filename. |
| 156 | func ThumbnailExt(format string) string { |
| 157 | switch format { |
| 158 | case "png": |
| 159 | return ".png" |
| 160 | case "jpeg", "jpg": |
| 161 | return ".jpg" |
| 162 | default: |
| 163 | return ".bin" |
| 164 | } |
| 165 | } |
no outgoing calls