File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
eFormAPI/eFormAPI/Controllers Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -45,12 +45,10 @@ public HttpResponseMessage Csv(int id)
4545 }
4646
4747 [ HttpGet ]
48- [ Route ( "api/template-files/get-image/{fileName}.png" ) ]
49- [ Route ( "api/template-files/get-image/{fileName}.jpg" ) ]
50- [ Route ( "api/template-files/get-image/{fileName}.jpeg" ) ]
51- public HttpResponseMessage GetImage ( string fileName , string noCache = "noCache" )
48+ [ Route ( "api/template-files/get-image/{fileName}.{ext}" ) ]
49+ public HttpResponseMessage GetImage ( string fileName , string ext , string noCache = "noCache" )
5250 {
53- var filePath = HttpContext . Current . Server . MapPath ( $ "~/output/datafolder/picture/{ fileName } ") ;
51+ var filePath = HttpContext . Current . Server . MapPath ( $ "~/output/datafolder/picture/{ fileName } . { ext } ") ;
5452 if ( ! File . Exists ( filePath ) )
5553 {
5654 return new HttpResponseMessage ( HttpStatusCode . NotFound ) ;
You can’t perform that action at this time.
0 commit comments