export function shouldProcessStorageObject()

in storage-label-videos/functions/src/utils.ts [71:85]


export function shouldProcessStorageObject(objectName?: string): boolean {
  if (!objectName) return false;

  // Is the file located in INPUT_VIDEOS_PATH.
  if (!`/${objectName}`.startsWith(config.inputVideosPath)) {
    logs.skipPath(objectName);
    return false;
  }

  for (const type of validMediaExtensions) {
    if (objectName.endsWith(type)) return true;
  }

  return false;
}