|
@@ -76,12 +76,9 @@ namespace iiie.WebApiUtils.BusinessManager
|
76
|
76
|
/// Save the uploaded file to the temp dir
|
77
|
77
|
/// </summary>
|
78
|
78
|
/// <returns>The file path</returns>
|
|
79
|
+ [NonAction]
|
79
|
80
|
public async Task<OpResult<string>> SaveFileToTemp()
|
80
|
81
|
{
|
81
|
|
- if (!Request.Content.IsMimeMultipartContent())
|
82
|
|
- {
|
83
|
|
- return OpResult<string>.Error(ResultStatus.InputError, "Bad content type", "");
|
84
|
|
- }
|
85
|
82
|
IEnumerable<HttpContent> parts = null;
|
86
|
83
|
try
|
87
|
84
|
{
|
|
@@ -90,7 +87,7 @@ namespace iiie.WebApiUtils.BusinessManager
|
90
|
87
|
}
|
91
|
88
|
catch (Exception e)
|
92
|
89
|
{
|
93
|
|
- return OpResult<string>.Error(ResultStatus.InputError, e, "Failed to read uploaded file");
|
|
90
|
+ return OpResult<string>.Error(ResultStatus.InputError, e, "Failed to read post parts (maximum size exceeded?)");
|
94
|
91
|
}
|
95
|
92
|
HttpContent file = parts.FirstOrDefault();
|
96
|
93
|
if (file == null)
|