|
<< Click to Display Table of Contents >> Navigation: Telegram > 2019 > 08 > 20 > Telegram_2019-08-20T04 |
2019-08-20T04:05:19
Just call WebApplication.SendStream(YourStream, False/True, content_type);
2019-08-20T04:05:42
content_Type is the MIME type. For common types use constants defined in IWMimeTypes.pas
2019-08-20T04:06:04
const
{ do not localize }
MIME_JPG = 'image/jpeg';
MIME_GIF = 'image/gif';
MIME_PNG = 'image/png';
MIME_BMP = 'image/bmp';
MIME_RSS = 'application/rss+xml; charset=UTF-8';
MIME_XML = 'text/xml; charset=UTF-8';
MIME_XSL = 'text/xsl; charset=UTF-8';
MIME_TXT = 'text/plain; charset=UTF-8';
MIME_ICO = 'image/x-ico';
MIME_JavaScript = 'application/x-javascript; charset=UTF-8';
MIME_JsMap = 'application/json';
MIME_PDF = 'application/pdf';
MIME_ZIP = 'application/zip';
MIME_CSS = 'text/css; charset=UTF-8';
MIME_MP3 = 'audio/mpeg';
MIME_OGG = 'audio/ogg';
MIME_WAV = 'audio/wav';
MIME_Flash = 'application/x-shockwave-flash';
MIME_WMV = 'video/x-ms-wmv';
MIME_MOV = 'video/quicktime';
MIME_AVI = 'video/x-msvideo';
MIME_MPEG = 'video/mpeg';
MIME_Binary = 'application/octet-stream';
MIME_HTML = 'text/html; charset=UTF-8';
MIME_IWML = 'text/iwml; charset=UTF-8';
MIME_GZIP = 'application/x-gzip';
MIME_WOFF = 'application/font-woff';
MIME_TTF = 'application/font-ttf';
MIME_OTF = 'application/font-otf';
MIME_SVG = 'image/svg+xml';
MIME_JSON = 'application/json';
MIME_WOFF2 = 'application/font-woff2';
MIME_EOT = 'application/vnd.ms-fontobject';
MIME_DOCX = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
MIME_XLSX = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
MIME_PPTX = 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
2019-08-20T04:07:33
the second parameter (false/true) specifies wheter it is an attachment (I suggest you to try both and see how they behave and chose the one that suits you)
2019-08-20T04:08:16
They are a good idea, terribly implemented because of complete lazyness of Borland devs (when I say Borland, I mean Borland + all others, but specially original Borland devs which were really lazy regarding TFrame)
2019-08-20T04:11:42
- No Create/Destroy events (It would take 1/2 hour to implement that)
- You need to install it otherwise design time support gets compromised
- several design time issues (It is basically impossible to use the same frame at design time in several forms if they are different in each form)
2019-08-20T04:13:28
however, sometimes there is no other option