Fix posting images on web (#7105)
* Fix uploadBlob to handle blob: URI * Patch expo-image-manipulator to support "compress" argument * Narrow down the fix
This commit is contained in:
@@ -11,7 +11,10 @@ export async function uploadBlob(
|
||||
input: string | Blob,
|
||||
encoding?: string,
|
||||
): Promise<ComAtprotoRepoUploadBlob.Response> {
|
||||
if (typeof input === 'string' && input.startsWith('data:')) {
|
||||
if (
|
||||
typeof input === 'string' &&
|
||||
(input.startsWith('data:') || input.startsWith('blob:'))
|
||||
) {
|
||||
const blob = await fetch(input).then(r => r.blob())
|
||||
return agent.uploadBlob(blob, {encoding})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user