feat: image URL as https

This commit is contained in:
Shusui MOYATANI
2023-07-11 02:06:07 +09:00
parent 68fe6e67e1
commit ec6fb06e0d

View File

@@ -37,8 +37,10 @@ export const uploadNostrBuild = async (blob: Blob): Promise<UploadResult> => {
if (!res.ok) throw new Error('failed to post image: status code was not 2xx'); if (!res.ok) throw new Error('failed to post image: status code was not 2xx');
const imageUrl = (await res.json()) as string; const imageUrl = (await res.json()) as string;
const url = new URL(imageUrl);
url.protocol = 'https:';
return { imageUrl }; return { imageUrl: url.toString() };
}; };
export const uploadVoidCat = async (blob: Blob): Promise<any> => { export const uploadVoidCat = async (blob: Blob): Promise<any> => {