decord/source/modules/polls/PollAttachmentUtils.tsx

33 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 11354
// Function ID: 88354
2026-07-20 16:05:17 +00:00
// Name: _downloadPollGif
2026-07-24 07:16:23 +00:00
// Dependencies: [5, 7070, 2]
2026-07-20 16:05:17 +00:00
// Exports: downloadPollGif, getFileNameFromGifUrl, getFilePathForGif
2026-07-24 07:16:23 +00:00
// Module 11354 (_downloadPollGif)
2026-07-23 10:11:24 +00:00
import asyncGeneratorStep from "asyncGeneratorStep";
import { POLL_ATTACHMENT_FOLDER } from "POLL_ATTACHMENT_FOLDER";
2026-07-20 16:05:17 +00:00
function _downloadPollGif() {
// CreateGeneratorClosureLongIndex (0x67)
const obj = callback(tmp);
return obj(...arguments);
}
2026-07-23 10:11:24 +00:00
const result = require("set").fileFinishedImporting("modules/polls/PollAttachmentUtils.tsx");
2026-07-20 16:05:17 +00:00
export const getFileNameFromGifUrl = function getFileNameFromGifUrl(localCreationAnswerId, mediaURL) {
const parts = decodeURIComponent(mediaURL).split("/");
const arr = parts.pop();
let str2 = "temp.gif";
if (null != arr) {
str2 = arr;
}
return "" + localCreationAnswerId + "-" + str2;
};
export const getFilePathForGif = function getFilePathForGif(fileNameFromGifUrl) {
return POLL_ATTACHMENT_FOLDER + "/" + fileNameFromGifUrl;
};
export const downloadPollGif = function downloadPollGif(mediaURL) {
return _downloadPollGif(...arguments);
};