EAPUtilSavePostedFile Method (IAppContext, HttpPostedFile, String, String, Boolean, Int32) |
Save the provided posted file as specified. This method is used in response to the
user posting a HtmlInputFile control.
Note that this method validates maxSizeKB and will an error if validation fails.
Namespace:
NetQuarry
Assembly:
EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax public static string SavePostedFile(
IAppContext appCxt,
HttpPostedFile postedFile,
string destFileName,
string destPath,
bool physicalPath,
int maxSizeKB
)
Public Shared Function SavePostedFile (
appCxt As IAppContext,
postedFile As HttpPostedFile,
destFileName As String,
destPath As String,
physicalPath As Boolean,
maxSizeKB As Integer
) As String
Parameters
- appCxt
- Type: NetQuarryIAppContext
The application object. - postedFile
- Type: System.WebHttpPostedFile
The posted file stream to be saved. - destFileName
- Type: SystemString
The name under which to save the file. - destPath
- Type: SystemString
The path to which to save the file. - physicalPath
- Type: SystemBoolean
Is the specified path a physical path (vs. a virtual path)? - maxSizeKB
- Type: SystemInt32
The maximum allowed size of the file, in KB.
Return Value
Type:
StringThe fully qualified physical path + filename for the saved file, if successful, else null.
See Also