File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ extern "C" {
15
15
pub fn version ( this : & R2Object ) -> Result < String , JsValue > ;
16
16
17
17
#[ wasm_bindgen( method, catch, getter) ]
18
- pub fn size ( this : & R2Object ) -> Result < u32 , JsValue > ;
18
+ pub fn size ( this : & R2Object ) -> Result < f64 , JsValue > ;
19
19
20
20
#[ wasm_bindgen( method, catch, getter) ]
21
21
pub fn etag ( this : & R2Object ) -> Result < String , JsValue > ;
Original file line number Diff line number Diff line change @@ -180,11 +180,12 @@ impl Object {
180
180
}
181
181
}
182
182
183
- pub fn size ( & self ) -> u32 {
184
- match & self . inner {
183
+ pub fn size ( & self ) -> u64 {
184
+ let size = match & self . inner {
185
185
ObjectInner :: NoBody ( inner) => inner. size ( ) . unwrap ( ) ,
186
186
ObjectInner :: Body ( inner) => inner. size ( ) . unwrap ( ) ,
187
- }
187
+ } ;
188
+ size. round ( ) as u64
188
189
}
189
190
190
191
pub fn etag ( & self ) -> String {
You can’t perform that action at this time.
0 commit comments