feat: return file hash from uploaded object #4641
Annotations
10 errors
packages/uploadthing/test/client.test.ts#L124
AssertionError: expected [ { name: 'foo.txt', size: 3, …(8) } ] to deeply equal [ { name: 'foo.txt', size: 3, …(8) } ]
- Expected
+ Received
Array [
Object {
"appUrl": StringMatching /^https:\/\/utfs.io\/a\/app-1\/.+$/,
"customId": null,
- "hash": Any<String>,
+ "fileHash": undefined,
"key": StringMatching /.+/,
"lastModified": Any<Number>,
"name": "foo.txt",
"serverData": null,
"size": 3,
"type": "text/plain",
"url": StringMatching /^https:\/\/utfs.io\/f\/.+$/,
},
]
❯ test/client.test.ts:124:5
|
packages/uploadthing/test/client.test.ts#L163
AssertionError: expected [ { name: 'foo.txt', size: 3, …(8) } ] to deeply equal [ { name: 'foo.txt', size: 3, …(8) } ]
- Expected
+ Received
Array [
Object {
"appUrl": StringMatching /^https:\/\/utfs.io\/a\/app-1\/.+$/,
"customId": null,
- "hash": Any<String>,
+ "fileHash": undefined,
"key": StringMatching /.+/,
"lastModified": Any<Number>,
"name": "foo.txt",
"serverData": null,
"size": 3,
"type": "text/plain",
"url": StringMatching /^https:\/\/utfs.io\/f\/.+$/,
},
]
❯ test/client.test.ts:163:5
|
packages/uploadthing/test/client.test.ts#L198
AssertionError: expected [ { name: 'foo.txt', size: 3, …(8) } ] to deeply equal [ { name: 'foo.txt', size: 3, …(8) } ]
- Expected
+ Received
Array [
Object {
"appUrl": StringMatching /^https:\/\/utfs.io\/a\/app-1\/.+$/,
"customId": null,
- "hash": Any<String>,
+ "fileHash": undefined,
"key": StringMatching /.+/,
"lastModified": Any<Number>,
"name": "foo.txt",
"serverData": null,
"size": 3,
"type": "text/plain",
"url": StringMatching /^https:\/\/utfs.io\/f\/.+$/,
},
]
❯ test/client.test.ts:198:5
|
packages/uploadthing/test/sdk.test.ts#L47
AssertionError: expected { data: { …(9) }, error: null } to deeply equal { data: { …(9) }, error: null }
- Expected
+ Received
Object {
"data": Object {
"appUrl": "https://utfs.io/a/app-1/u7rKiJYp268seyXN4iERSnf5E7mJgIFqsQM62cNpjouxyi3X",
"customId": null,
- "hash": Any<String>,
+ "fileHash": undefined,
"key": StringMatching /.+/,
"lastModified": 1727386237904,
"name": "foo.txt",
"size": 3,
"type": "text/plain",
"url": "https://utfs.io/f/u7rKiJYp268seyXN4iERSnf5E7mJgIFqsQM62cNpjouxyi3X",
},
"error": null,
}
❯ test/sdk.test.ts:47:20
|
packages/uploadthing/test/sdk.test.ts#L130
AssertionError: expected { data: { …(9) }, error: null } to deeply equal { data: { …(9) }, error: null }
- Expected
+ Received
Object {
"data": Object {
"appUrl": "https://utfs.io/a/app-1/u7rKiJYp268skhH2rhvuZaFbQOrV90MKDzPohfTXwgpCvYWq",
"customId": null,
- "hash": Any<String>,
+ "fileHash": undefined,
"key": StringMatching /.+/,
"lastModified": Any<Number>,
"name": "foo.txt",
"size": 26,
"type": "text/plain",
"url": "https://utfs.io/f/u7rKiJYp268skhH2rhvuZaFbQOrV90MKDzPohfTXwgpCvYWq",
},
"error": null,
}
❯ test/sdk.test.ts:130:20
|
packages/uploadthing/test/sdk.test.ts#L229
AssertionError: expected [ …(3) ] to strictly equal [ …(3) ]
- Expected
+ Received
Array [
Object {
"data": Object {
"appUrl": "https://utfs.io/a/app-1/u7rKiJYp268sVvNsG1jXiCAWDk13YnIKosJbx5Pg6e8Qtcmz",
"customId": null,
- "hash": Any<String>,
+ "fileHash": undefined,
"key": StringMatching /.+/,
"lastModified": Any<Number>,
"name": "foo.txt",
"size": 26,
"type": "text/plain",
"url": "https://utfs.io/f/u7rKiJYp268sVvNsG1jXiCAWDk13YnIKosJbx5Pg6e8Qtcmz",
},
"error": null,
},
Object {
"data": null,
"error": Object {
"code": "BAD_REQUEST",
"data": undefined,
"message": "Please use uploadFiles() for data URLs. uploadFilesFromUrl() is intended for use with remote URLs only.",
},
},
Object {
"data": Object {
"appUrl": "https://utfs.io/a/app-1/u7rKiJYp268smtmrGEg75k3SVGs6EpbMDPafuF28WerKyAwx",
"customId": null,
- "hash": Any<String>,
+ "fileHash": undefined,
"key": StringMatching /.+/,
"lastModified": Any<Number>,
"name": "bar.txt",
"size": 26,
"type": "text/plain",
"url": "https://utfs.io/f/u7rKiJYp268smtmrGEg75k3SVGs6EpbMDPafuF28WerKyAwx",
},
"error": null,
},
]
❯ test/sdk.test.ts:229:20
|
packages/uploadthing/test/sdk.test.ts#L470
AssertionError: expected { data: { …(9) }, error: null } to deeply equal { Object (data, error) }
- Expected
+ Received
Object {
"data": Object {
"appUrl": StringMatching /^https:\/\/utfs.io\/a\/fr0hfwpst1\/.+$/,
"customId": null,
- "hash": Any<String>,
+ "fileHash": undefined,
"key": StringMatching /.+/,
"lastModified": 1727386240110,
"name": "foo.txt",
"size": 3,
"type": "text/plain",
"url": StringMatching /^https:\/\/utfs.io\/f\/.+$/,
},
"error": null,
}
❯ test/sdk.test.ts:470:22
|
packages/uploadthing/test/sdk.test.ts#L506
AssertionError: expected { data: { …(9) }, error: null } to deeply equal { Object (data, error) }
- Expected
+ Received
Object {
"data": Object {
"appUrl": StringMatching /^https:\/\/utfs.io\/a\/fr0hfwpst1\/.+$/,
"customId": null,
- "hash": Any<String>,
+ "fileHash": undefined,
"key": StringMatching /.+/,
"lastModified": 1727386241975,
"name": "foo.txt",
"size": 3,
"type": "text/plain",
"url": StringMatching /^https:\/\/utfs.io\/f\/.+$/,
},
"error": null,
}
❯ test/sdk.test.ts:506:22
|
packages/uploadthing/test/sdk.test.ts#L537
AssertionError: expected { data: { …(9) }, error: null } to deeply equal { Object (data, error) }
- Expected
+ Received
Object {
"data": Object {
"appUrl": StringMatching /^https:\/\/utfs.io\/a\/fr0hfwpst1\/.+$/,
"customId": null,
- "hash": Any<String>,
+ "fileHash": undefined,
"key": StringMatching /.+/,
"lastModified": Any<Number>,
"name": "favicon.ico",
"size": Any<Number>,
"type": "image/vnd.microsoft.icon",
"url": StringMatching /^https:\/\/utfs.io\/f\/.+$/,
},
"error": null,
}
❯ test/sdk.test.ts:537:22
|
packages/uploadthing/test/sdk.test.ts#L562
AssertionError: expected { data: { …(9) }, error: null } to deeply equal { Object (data, error) }
- Expected
+ Received
Object {
"data": Object {
"appUrl": StringMatching /^https:\/\/utfs.io\/a\/fr0hfwpst1\/.+$/,
"customId": null,
- "hash": Any<String>,
+ "fileHash": undefined,
"key": StringMatching /.+/,
"lastModified": Any<Number>,
"name": "bar.txt",
"size": 3,
"type": "text/plain",
"url": StringMatching /^https:\/\/utfs.io\/f\/.+$/,
},
"error": null,
}
❯ test/sdk.test.ts:562:22
|
This job failed
Loading