Skip to content

Commit b70ce14

Browse files
authored
feat(admin): public.zip upload (#964)
1 parent d3c3486 commit b70ce14

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/app/api/tasks/[id]/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ export async function PUT(
8181
const Key =
8282
file.type === 'application/pdf'
8383
? `statements/pdf/${task.id}.pdf`
84-
: `testcases/${task.id}/${file.path}`
84+
: file.type === 'application/zip'
85+
? `statements/attachments/${task.id}.zip`
86+
: `testcases/${task.id}/${file.path}`
8587
const url = await getSignedUrl(
8688
s3Client,
8789
new PutObjectCommand({

src/components/Admin/Assessments/SubmitComponent.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ const SubmitComponent = () => {
2626
<label>Is single file?</label>
2727
</div>
2828
</div>
29+
<p>
30+
You can also upload statements by uploading pdf file and public
31+
attachments by uploading zip file
32+
</p>
2933
<UploadBox />
3034
</div>
3135
</div>

0 commit comments

Comments
 (0)