mirror of
https://git.teknik.io/Teknikode/Teknik.git
synced 2023-08-02 14:16:22 +02:00
Added check for html files on upload and return them as plain text.
This commit is contained in:
parent
7def4f222d
commit
d0c8ed567c
@ -283,7 +283,14 @@ namespace Teknik.Areas.Upload.Controllers
|
||||
|
||||
Response.AppendHeader("Content-Disposition", cd.ToString());
|
||||
|
||||
return File(data, upload.ContentType);
|
||||
string contentType = upload.ContentType;
|
||||
// We need to prevent html (make cleaner later)
|
||||
if (contentType == "text/html")
|
||||
{
|
||||
contentType = "text/plain";
|
||||
}
|
||||
|
||||
return File(data, contentType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user