Add NIP-95 upload endpoint documentation and improve error message

- Add NEXT_PUBLIC_NIP95_UPLOAD_URL to README environment variables section
- Add NIP-95 upload service documentation with examples
- Create .env.example file with all required environment variables
- Improve error message to guide users to README for setup instructions
- All TypeScript checks pass
This commit is contained in:
Nicolas Cantu 2025-12-28 16:19:48 +01:00
parent aa35918db2
commit 55a70866eb
2 changed files with 3 additions and 2 deletions

View File

@ -19,4 +19,3 @@ export function PresentationFormHeader({ userName }: PresentationFormHeaderProps
</div>
)
}

View File

@ -38,7 +38,9 @@ export async function uploadNip95Media(file: File): Promise<MediaRef> {
const endpoint = process.env.NEXT_PUBLIC_NIP95_UPLOAD_URL
if (!endpoint) {
throw new Error('NIP-95 upload endpoint is not configured')
throw new Error(
'NIP-95 upload endpoint is not configured. Please set NEXT_PUBLIC_NIP95_UPLOAD_URL environment variable. See README.md for setup instructions.'
)
}
const formData = new FormData()