File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ export async function POST(req: Request) {
5959
6060 let final_url : string | undefined = "" ;
6161 let public_id_cloudinary : string | undefined = "" ;
62- let thumbnail_url : string | undefined = "" ;
6362
6463 if ( ! files || files . length === 0 ) {
6564 return NextResponse . json (
@@ -93,19 +92,13 @@ export async function POST(req: Request) {
9392 ) ;
9493 }
9594
96- const thumbnailResponse = cloudinary . v2 . image ( final_url ! , {
97- format : "jpg" ,
98- } ) ;
99- thumbnail_url = thumbnailResponse
100- . replace ( "pdf" , "jpg" )
101- . replace ( "upload" , "upload/w_400,h_400,c_fill" )
102- . replace ( / < i m g s r c = ' | ' \s * \/ > / g, "" ) ;
10395
10496 const paper = new PaperAdmin ( {
10597 cloudinary_index : configIndex ,
98+
10699 public_id_cloudinary,
107100 final_url,
108- thumbnail_url,
101+ thumbnail_url : null ,
109102 subject : null ,
110103 slot : null ,
111104 year : null ,
You can’t perform that action at this time.
0 commit comments