mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
working on implementing the presigned url for eco spreadhseet
This commit is contained in:
parent
f822030c5d
commit
02cb7c6d21
2 changed files with 5 additions and 1 deletions
|
|
@ -15,6 +15,8 @@ export async function POST(request: NextRequest) {
|
|||
const body = await request.json();
|
||||
let validatedBody;
|
||||
|
||||
console.log("HIHIHIHIHIHI");
|
||||
|
||||
try {
|
||||
validatedBody = presignedUrlSchema.parse(body);
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ const useUploadFiles = ({
|
|||
{
|
||||
onSuccess: (data) => {
|
||||
try {
|
||||
console.log("Trying to generate presigned urls");
|
||||
const response = mutateUploadFiles({
|
||||
presignedUrls: data.urls,
|
||||
files: files,
|
||||
|
|
@ -119,6 +120,7 @@ async function generatePresignedUrls({
|
|||
})),
|
||||
});
|
||||
|
||||
console.log("Trying to generate presigned urls 111");
|
||||
const presignedResponse = await fetch("/api/upload/eco-spreadsheet", {
|
||||
method: "POST",
|
||||
body: body,
|
||||
|
|
@ -241,7 +243,7 @@ export default function EcoSpreadsheetHome() {
|
|||
<SelectFolder handleOnChange={handleOnChange} />
|
||||
</div>
|
||||
|
||||
<div>{uploadMessage}</div>
|
||||
<div className="text-red-500 mb-2">{uploadMessage}</div>
|
||||
|
||||
<div className="mb-4 text-left">
|
||||
Additionally, you can upload an optional ECO Excel spreadsheet
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue