Ad image check: a host that is slow or blocks the checker gives a warning, not a refusal (only a too-big file or a missing upload refuses)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -502,6 +502,9 @@ async function imageCheck(url, size) {
|
||||
}
|
||||
} catch (e) {}
|
||||
if (!got) got = await imageFetch(url, 0);
|
||||
// a host that is slow or blocks our checker must not block a real ad: only a too-big file or a missing upload refuses
|
||||
// outright; anything else goes through with a warning (review 2026-10-18)
|
||||
if (got.error && !/larger than 3 MB|not on this server/.test(got.error)) return { ok: true, warn: 'We could not check your banner image just now (' + got.error + '). If it does not show in your ad, upload the image instead.' };
|
||||
if (got.error) return { ok: false, reason: 'We checked your banner image and ' + got.error + '. Upload the image or paste a working https link to it.' };
|
||||
const mime = IMG_MAGIC(got.buf);
|
||||
if (!mime) return { ok: false, reason: 'That link does not lead to a PNG, JPG, GIF or WebP image. Upload the image or paste a direct link to the image file.' };
|
||||
|
||||
Reference in New Issue
Block a user