From 4e7f9d650ed77db5c2ff7388a140fed790e2d784 Mon Sep 17 00:00:00 2001 From: Yury Date: Wed, 15 May 2024 11:41:10 +0300 Subject: [PATCH] feat: changed MIME type of the uploaded file to sigit --- src/utils/misc.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/misc.ts b/src/utils/misc.ts index 6f5922c..1dde474 100644 --- a/src/utils/misc.ts +++ b/src/utils/misc.ts @@ -18,8 +18,8 @@ export const uploadToFileStorage = async ( const unixNow = Math.floor(Date.now() / 1000) // Create a File object with the Blob data - const file = new File([blob], `zipped-${unixNow}.zip`, { - type: 'application/zip' + const file = new File([blob], `compressed-${unixNow}.sigit`, { + type: 'application/sigit' }) // Define event metadata for authorization @@ -39,13 +39,13 @@ export const uploadToFileStorage = async ( const authEvent = await nostrController.signEvent(event) // URL of the file storage service - const FILE_STORAGE_URL = 'https://blossom.sigit.io' + const FILE_STORAGE_URL = 'https://blossom.sigit.io' // REFACTOR: should be an env // Upload the file to the file storage service using Axios const response = await axios.put(`${FILE_STORAGE_URL}/upload`, file, { headers: { Authorization: 'Nostr ' + btoa(JSON.stringify(authEvent)), // Set authorization header - 'Content-Type': 'application/zip' // Set content type header + 'Content-Type': 'application/sigit' // Set content type header } })