UNPKG

@seshuk/payload-storage-bunny

Version:
11 lines (10 loc) 414 B
import { posix } from 'node:path'; export const getGenerateURL = ({ storage, stream })=>{ return ({ data, filename, prefix = '' })=>{ if (stream && data.bunnyVideoId) { return `https://${stream.hostname}/${data.bunnyVideoId}/playlist.m3u8`; } return `https://${storage.hostname}/${encodeURI(posix.join(prefix, filename))}`; }; }; //# sourceMappingURL=generateURL.js.map