feat(downloads): a clip or an edit can be a GIF, shared as a picture
A clip and an editor range can come out as a silent GIF (long side 320/480/640, 12 fps, at most 30 s, one palette per GIF); one over 30 MB is not kept. A shared picture is served inline under the preview's sandbox, and a GIF's link card is the GIF itself up to 15 MB, the still for Facebook's crawler.
This commit is contained in:
@@ -55,6 +55,15 @@ describe.each(["en", "hu"])("localizeDetail (%s)", (lng) => {
|
||||
expect(upload).not.toBe(i18n.t("downloads.errors.upload.tooLarge", { size: "" }));
|
||||
});
|
||||
|
||||
it("says a clip's cap in minutes and a GIF's in seconds, from a clip or an edit", async () => {
|
||||
expect(await say({ code: "clip", reason: "too_long", limit_s: 600 })).toContain("10");
|
||||
for (const code of ["clip", "edit"]) {
|
||||
const said = await say({ code, reason: "gif_too_long", limit_s: 30 });
|
||||
expect(said).toContain("30");
|
||||
expect(said).not.toContain("{{");
|
||||
}
|
||||
});
|
||||
|
||||
it("says a shared-sentence code's own fallback for a reason it does not know", async () => {
|
||||
expect(await say({ code: "quota", reason: "nope" })).toBe(
|
||||
i18n.t("downloads.errors.quota.generic"),
|
||||
|
||||
Reference in New Issue
Block a user