Bluesky app fork with some witchin' additions 💫

Image saving - fix extension, increase download timeout (#9388)

authored by samuel.fm and committed by

GitHub 24c96ac8 c92ac4ab

+9 -9
+9 -9
src/lib/media/manip.ts
··· 84 84 return 85 85 } 86 86 87 - // we're currently relying on the fact our CDN only serves pngs 87 + // we're currently relying on the fact our CDN only serves jpegs 88 88 // -prf 89 - const imageUri = await downloadImage(uri, createPath('png'), 5e3) 90 - const imagePath = await moveToPermanentPath(imageUri, '.png') 89 + const imageUri = await downloadImage(uri, createPath('jpg'), 15e3) 90 + const imagePath = await moveToPermanentPath(imageUri, '.jpg') 91 91 safeDeleteAsync(imageUri) 92 92 await Sharing.shareAsync(imagePath, { 93 - mimeType: 'image/png', 94 - UTI: 'image/png', 93 + mimeType: 'image/jpeg', 94 + UTI: 'image/jpeg', 95 95 }) 96 96 } 97 97 ··· 100 100 export async function saveImageToMediaLibrary({uri}: {uri: string}) { 101 101 // download the file to cache 102 102 // NOTE 103 - // assuming PNG 104 - // we're currently relying on the fact our CDN only serves pngs 103 + // assuming JPEG 104 + // we're currently relying on the fact our CDN only serves jpegs 105 105 // -prf 106 - const imageUri = await downloadImage(uri, createPath('png'), 5e3) 107 - const imagePath = await moveToPermanentPath(imageUri, '.png') 106 + const imageUri = await downloadImage(uri, createPath('jpg'), 15e3) 107 + const imagePath = await moveToPermanentPath(imageUri, '.jpg') 108 108 109 109 // save 110 110 try {