File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export type PasteMetadata = {
99 willExpireAtUnix : number
1010
1111 accessCounter : number // a counter representing how frequent it is accessed, to administration usage
12+ sizeBytes ?: number ,
1213 filename ?: string
1314}
1415
@@ -100,6 +101,7 @@ export async function updatePaste(
100101 createdAtUnix : originalMetadata . createdAtUnix ,
101102 willExpireAtUnix : expirationUnix ,
102103 accessCounter : originalMetadata . accessCounter ,
104+ sizeBytes : content . byteLength ,
103105 } ,
104106 expiration : expirationUnix ,
105107 }
@@ -129,6 +131,7 @@ export async function createPaste(
129131 createdAtUnix : dateToUnix ( options . now ) ,
130132 willExpireAtUnix : expirationUnix ,
131133 accessCounter : 0 ,
134+ sizeBytes : content . byteLength ,
132135 } ,
133136 expiration : expirationUnix ,
134137 }
You can’t perform that action at this time.
0 commit comments