@@ -214,33 +214,6 @@ describe('/api/files/presigned', () => {
214214 expect ( data . directUploadSupported ) . toBe ( true )
215215 } )
216216
217- it ( 'should generate chat S3 presigned URL with chat prefix and direct path' , async ( ) => {
218- setupFileApiMocks ( {
219- cloudEnabled : true ,
220- storageProvider : 's3' ,
221- } )
222-
223- const { POST } = await import ( '@/app/api/files/presigned/route' )
224-
225- const request = new NextRequest ( 'http://localhost:3000/api/files/presigned?type=chat' , {
226- method : 'POST' ,
227- body : JSON . stringify ( {
228- fileName : 'chat-logo.png' ,
229- contentType : 'image/png' ,
230- fileSize : 4096 ,
231- } ) ,
232- } )
233-
234- const response = await POST ( request )
235- const data = await response . json ( )
236-
237- expect ( response . status ) . toBe ( 200 )
238- expect ( data . fileInfo . key ) . toMatch ( / ^ c h a t \/ .* c h a t - l o g o \. p n g $ / )
239- expect ( data . fileInfo . path ) . toMatch ( / \/ a p i \/ f i l e s \/ s e r v e \/ s 3 \/ .+ \? c o n t e x t = c h a t $ / )
240- expect ( data . presignedUrl ) . toBeTruthy ( )
241- expect ( data . directUploadSupported ) . toBe ( true )
242- } )
243-
244217 it ( 'should generate Azure Blob presigned URL successfully' , async ( ) => {
245218 setupFileApiMocks ( {
246219 cloudEnabled : true ,
@@ -273,33 +246,6 @@ describe('/api/files/presigned', () => {
273246 expect ( data . directUploadSupported ) . toBe ( true )
274247 } )
275248
276- it ( 'should generate chat Azure Blob presigned URL with chat prefix and direct path' , async ( ) => {
277- setupFileApiMocks ( {
278- cloudEnabled : true ,
279- storageProvider : 'blob' ,
280- } )
281-
282- const { POST } = await import ( '@/app/api/files/presigned/route' )
283-
284- const request = new NextRequest ( 'http://localhost:3000/api/files/presigned?type=chat' , {
285- method : 'POST' ,
286- body : JSON . stringify ( {
287- fileName : 'chat-logo.png' ,
288- contentType : 'image/png' ,
289- fileSize : 4096 ,
290- } ) ,
291- } )
292-
293- const response = await POST ( request )
294- const data = await response . json ( )
295-
296- expect ( response . status ) . toBe ( 200 )
297- expect ( data . fileInfo . key ) . toMatch ( / ^ c h a t \/ .* c h a t - l o g o \. p n g $ / )
298- expect ( data . fileInfo . path ) . toMatch ( / \/ a p i \/ f i l e s \/ s e r v e \/ b l o b \/ .+ \? c o n t e x t = c h a t $ / )
299- expect ( data . presignedUrl ) . toBeTruthy ( )
300- expect ( data . directUploadSupported ) . toBe ( true )
301- } )
302-
303249 it ( 'should return error for unknown storage provider' , async ( ) => {
304250 setupFileApiMocks ( {
305251 cloudEnabled : true ,
0 commit comments