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 = {
9
9
willExpireAtUnix : number
10
10
11
11
accessCounter : number // a counter representing how frequent it is accessed, to administration usage
12
+ sizeBytes ?: number ,
12
13
filename ?: string
13
14
}
14
15
@@ -100,6 +101,7 @@ export async function updatePaste(
100
101
createdAtUnix : originalMetadata . createdAtUnix ,
101
102
willExpireAtUnix : expirationUnix ,
102
103
accessCounter : originalMetadata . accessCounter ,
104
+ sizeBytes : content . byteLength ,
103
105
} ,
104
106
expiration : expirationUnix ,
105
107
}
@@ -129,6 +131,7 @@ export async function createPaste(
129
131
createdAtUnix : dateToUnix ( options . now ) ,
130
132
willExpireAtUnix : expirationUnix ,
131
133
accessCounter : 0 ,
134
+ sizeBytes : content . byteLength ,
132
135
} ,
133
136
expiration : expirationUnix ,
134
137
}
You can’t perform that action at this time.
0 commit comments