···232232 pushToast(`${file.name} duration could not be processed`, false);
233233 deleteFileOnError();
234234 } else if (videoDuration > MAX_VIDEO_LENGTH) {
235235- pushToast(`${file.name} is too long for bsky by ${(videoDuration - MAX_VIDEO_LENGTH).toFixed(2)} seconds`, false);
235235+ pushToast(`${file.name} is over the maximum video duration by ${(videoDuration - MAX_VIDEO_LENGTH).toFixed(2)} seconds`, false);
236236+ deleteFileOnError();
237237+ } else if (videoDuration >= MAX_GIF_LENGTH) {
238238+ pushToast(`${file.name} is over the maximum length for a gif by ${(videoDuration - MAX_GIF_LENGTH).toFixed(2)} seconds`, false);
236239 deleteFileOnError();
237240 } else {
238241 fileData.set(file.name, { content: response.data, type: 3, height: imageHeight, width: imageWidth, duration: videoDuration });
···11+import remove from "just-remove";
22+13/** APPLICATION CONFIGURATIONS **/
24// minimum length of a post
35export const MIN_LENGTH: number = 1;
···79export const MAX_REPOST_DAYS: number = 10;
810// max amount of days to hold a post after it's been posted and has no reposts before it's purged from the DB
911export const MAX_HOLD_DAYS_BEFORE_PURGE: number = 7;
1212+// max length of an animated gif in minutes
1313+export const MAX_GIF_LENGTH: number = 1;
1414+// if gifs should be allowed to upload
1515+export const GIF_UPLOAD_ALLOWED: boolean = false;
10161117// This is the length of how much we keep in the DB after a post has been made
1218export const MAX_POSTED_LENGTH: number = 50;
···95101];
9610297103// Used for human readable display
9898-export const BSKY_VIDEO_FILE_EXTS: string = [
104104+export const BSKY_VIDEO_FILE_EXTS: string = remove([
99105 "mp4",
100106 "m4v",
101107 "mp4v",
···107113 "mov",
108114 "qt",
109115 "webm",
110110- "animated gif" /* This is handled in a special case because bluesky */
111111-].join(", ");
116116+ /* This is handled in a special case because bluesky */
117117+ (GIF_UPLOAD_ALLOWED ? "animated gif" : undefined)
118118+], [undefined]).join(", ");
112119113120// Max size of files that can go to R2 without doing multipart uploads
114121export const R2_FILE_SIZE_LIMIT_IN_MB: number = 100;
···116123export const BSKY_IMG_SIZE_LIMIT: number = BSKY_IMG_SIZE_LIMIT_IN_MB * MB_TO_BYTES;
117124export const BSKY_VIDEO_SIZE_LIMIT: number = BSKY_VIDEO_MAX_SIZE_IN_MB * MB_TO_BYTES;
118125export const BSKY_VIDEO_LENGTH_LIMIT: number = BSKY_VIDEO_MAX_DURATION * TO_SEC;
126126+export const MAX_GIF_LENGTH_LIMIT: number = MAX_GIF_LENGTH * TO_SEC;
119127// Max size of Cloudflare Images files
120128export const CF_IMAGES_FILE_SIZE_LIMIT_IN_MB: number = 70;
121129export const CF_IMAGES_FILE_SIZE_LIMIT: number = CF_IMAGES_FILE_SIZE_LIMIT_IN_MB * MB_TO_BYTES;
+1-1
src/utils/appScripts.ts
···11// Change this value to break out of any caching that might be happening
22// for the runtime scripts (ex: main.js & postHelper.js)
33-export const CURRENT_SCRIPT_VERSION: string = "1.4.1";
33+export const CURRENT_SCRIPT_VERSION: string = "1.4.2";
4455export const getAppScriptStr = (scriptName: string) => `/js/${scriptName}.min.js?v=${CURRENT_SCRIPT_VERSION}`;
66