From 08d75fd75c063bd17d2471b263452b490910338b Mon Sep 17 00:00:00 2001
From: Mert Demir <mertd@users.noreply.github.com>
Date: Thu, 1 Feb 2024 07:00:19 +0900
Subject: Support for additional S3 providers (#71)

* support for other s3 providers

* remove redundant route options

* use type safe env

* prettier
---
 src/components/expense-documents-input.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/components/expense-documents-input.tsx')

diff --git a/src/components/expense-documents-input.tsx b/src/components/expense-documents-input.tsx
index b9cda33..7b69a6d 100644
--- a/src/components/expense-documents-input.tsx
+++ b/src/components/expense-documents-input.tsx
@@ -18,7 +18,7 @@ import { useToast } from '@/components/ui/use-toast'
 import { randomId } from '@/lib/api'
 import { ExpenseFormValues } from '@/lib/schemas'
 import { Loader2, Plus, Trash, X } from 'lucide-react'
-import { getImageData, useS3Upload } from 'next-s3-upload'
+import { getImageData, usePresignedUpload } from 'next-s3-upload'
 import Image from 'next/image'
 import { useEffect, useState } from 'react'
 
@@ -29,7 +29,7 @@ type Props = {
 
 export function ExpenseDocumentsInput({ documents, updateDocuments }: Props) {
   const [pending, setPending] = useState(false)
-  const { FileInput, openFileDialog, uploadToS3 } = useS3Upload()
+  const { FileInput, openFileDialog, uploadToS3 } = usePresignedUpload() // use presigned uploads to addtionally support providers other than AWS
   const { toast } = useToast()
 
   const handleFileChange = async (file: File) => {
-- 
cgit v1.3

