Click or drag to resize

HttpUtilityWriteFileFromDatabase Method (IAppContext, IDatabase, String, String, String, String, String, Boolean)

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.

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,
	bool attachInline
)

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.
attachInline
Type: SystemBoolean
True to return the file as an inline attachment. This should be used for images.

Return Value

Type: Boolean
True if non-empty file content was found and written, else false.
See Also