HttpUtilityWriteFileFromDatabase Method (IAppContext, IDatabase, String, String, String, String, String, WriteFileOptions, Int32) |
Writes a file from a database resource to the Response stream.
Note that unless
NoFlushAndComplete or
NoFlushAndCompleteIfEmpty
is set, this call will flush and complete the request if a record is found (even if the file data empty).
Namespace:
NetQuarry.Net
Assembly:
EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax public static bool WriteFileFromDatabase(
IAppContext cxt,
IDatabase db,
string dbField,
string dbTable,
string dbKeyFilter,
string uniqueFileName,
string mimeType,
WriteFileOptions options,
int cacheExpires = 0
)
Public Shared Function WriteFileFromDatabase (
cxt As IAppContext,
db As IDatabase,
dbField As String,
dbTable As String,
dbKeyFilter As String,
uniqueFileName As String,
mimeType As String,
options As WriteFileOptions,
Optional cacheExpires As Integer = 0
) As Boolean
Parameters
- cxt
- Type: NetQuarryIAppContext
The application context object - db
- Type: NetQuarryIDatabase
The database to use. - dbField
- Type: SystemString
The database field where the binary data resides. - dbTable
- Type: SystemString
The table to use (same idea as DBLookup(String, String, String)) - dbKeyFilter
- Type: SystemString
The filter to use (same idea as DBLookup(String, String, String)) - uniqueFileName
- Type: SystemString
The name of the file. If the file is inline, this parameter can be anything. - mimeType
- Type: SystemString
The mimetype of the data. If blank, the type 'application/octet-stream' is used. - options
- Type: NetQuarry.NetWriteFileOptions
Options for the file write.. - cacheExpires (Optional)
- Type: SystemInt32
The number of minutes before the file expires.
Return Value
Type:
BooleanTrue if non-empty file content was found and written, else false.
See Also