feat: changed MIME type of the uploaded file to sigit
This commit is contained in:
parent
8e1f445da6
commit
4e7f9d650e
@ -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
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user