fix: size is missing
This commit is contained in:
parent
6252979d28
commit
4619f9709c
|
@ -60,6 +60,7 @@ async function getIsManifest(s5: S5Client, hash: string): Promise<boolean | numb
|
||||||
export interface FileItem {
|
export interface FileItem {
|
||||||
cid: string;
|
cid: string;
|
||||||
type: string;
|
type: string;
|
||||||
|
size: number;
|
||||||
mimeType: string;
|
mimeType: string;
|
||||||
pinned: string;
|
pinned: string;
|
||||||
}
|
}
|
||||||
|
@ -80,6 +81,7 @@ export const fileProvider: SdkProvider = {
|
||||||
cid: new CID(manifest, mHash, pin.size).toString(),
|
cid: new CID(manifest, mHash, pin.size).toString(),
|
||||||
type: "manifest",
|
type: "manifest",
|
||||||
mimeType: "application/octet-stream",
|
mimeType: "application/octet-stream",
|
||||||
|
size: pin.size,
|
||||||
pinned: pin.pinned_at,
|
pinned: pin.pinned_at,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -87,6 +89,7 @@ export const fileProvider: SdkProvider = {
|
||||||
cid: new CID(CID_TYPES.RAW, Multihash.fromBase64Url(pin.hash), pin.size).toString(),
|
cid: new CID(CID_TYPES.RAW, Multihash.fromBase64Url(pin.hash), pin.size).toString(),
|
||||||
type: "raw",
|
type: "raw",
|
||||||
mimeType: pin.mime_type,
|
mimeType: pin.mime_type,
|
||||||
|
size: pin.size,
|
||||||
pinned: pin.pinned_at,
|
pinned: pin.pinned_at,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue