Skip to content

Commit 112ab41

Browse files
committed
add mime type related info
1 parent d11dd1b commit 112ab41

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

indepth/deployment/server.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ Once you have finished integrating `DWT` in your application, you can deploy it
2727
| `.deb` | `application/x-debian-package` | [Browsers on Linux]({{site.getstarted}}Platform.html#browsers-on-linux) |
2828
| `.rpm` | `application/x-redhat-package-manager` | [Browsers on Linux]({{site.getstarted}}Platform.html#browsers-on-linux) |
2929

30+
### How to set the MIME type
31+
32+
Different servers are configured differently. Here are some popular ones:
33+
34+
NGINX: [ `mime.types` ](https://www.nginx.com/resources/wiki/start/topics/examples/full/#mime-types)
35+
IIS: [ `Web.config` ](https://docs.microsoft.com/en-us/iis/configuration/system.webserver/staticcontent/mimemap#how-to-add-a-mime-type-to-a-web-site-or-application)
36+
Java™ EE web app: [ `web.xml` ](https://docs.oracle.com/cd/E24329_01/web.1211/e21049/web_xml.htm#WBAPP533)
37+
Node.js: [ `npm mime` ](https://www.npmjs.com/package/mime-types)
38+
3039
## Enable HTTPS
3140

3241
If you need to use any of the following features, you must enable HTTPS on the server.
@@ -48,5 +57,3 @@ When you set `ResourcesPath` wrong, static files such as `dynamsoft.webtwain.ins
4857
### Using an absolute path
4958

5059
In some cases, you might not be able to *calculate* the correct relative path for these files and wishes to use an absolute path instead such as "https://www.dynamsoft.com/dwt/demo/resources/". This is supported but keep in mind that if you want to use the new [Camera module]({{site.indepth}}features/Input.html#use-mediadevices-cameras) or run `DWT` in the [WASM mode]({{site.indepth}}features/initialize.html#wasm-mode), you must make sure the absolute path stays in the same domain to avoid cross-origin issues.
51-
52-

0 commit comments

Comments
 (0)