MCPcopy Create free account
hub / github.com/decaporg/decap-cms / blobToFileObj

Function blobToFileObj

packages/decap-cms-lib-util/src/implementation.ts:370–373  ·  view source on GitHub ↗
(name: string, blob: Blob)

Source from the content-addressed store, hash-verified

368}
369
370export function blobToFileObj(name: string, blob: Blob) {
371 const options = name.match(/.svg$/) ? { type: 'image/svg+xml' } : {};
372 return new File([blob], name, options);
373}
374
375export async function getMediaAsBlob(path: string, id: string | null, readFile: ReadFile) {
376 let blob: Blob;

Callers 11

deserializeMediaFileFunction · 0.90
getMediaFileMethod · 0.90
loadMediaFileMethod · 0.90
getMediaFileMethod · 0.90
getMediaFileMethod · 0.90
loadMediaFileMethod · 0.90
getMediaFileMethod · 0.90
getMediaFileMethod · 0.90
loadMediaFileMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected