-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added application/octet-stream section #205
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,31 @@ Files in the WebDevice are accessed relative to the current page's URL. For exam | |
> [!note] Note | ||
> It's important to note that this behavior depends on the current page's URL, as it uses a relative path. For more predictable results, it's recommended to use absolute paths when possible. | ||
|
||
### Using `application/octet-stream` for WebDevice directories | ||
|
||
To handle files from WebDevices properly, set default_type `application/octet-stream`. This ensures that files are treated as binary data. **Only apply this to WebDevice directories**, or it may cause issues like broken images or malfunctioning scripts. | ||
|
||
**Nginx configuration example**: | ||
|
||
```nginx | ||
http { | ||
# Set default type to application/octet-stream for WebDevice directories | ||
default_type application/octet-stream; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This example should be structured differently. The file should be identical to the default configuration, and inside there must be a We should also add a example line that creates the WebDevice to show that the path is the same used in the |
||
|
||
server { | ||
listen 8080; | ||
server_name localhost; | ||
|
||
gzip on; | ||
gzip_types application/javascript application/wasm text/plain application/octet-stream; | ||
|
||
# Other configurations go here (see full basic server guide for details) | ||
} | ||
} | ||
``` | ||
|
||
For a full server setup and additional details, check our [basic server guide](/docs/guides/nginx). | ||
|
||
## IDBDevice | ||
|
||
IDBDevice provides a persistent, read-write filesystem using the browser's IndexedDB. It's ideal for storing data that should persist between sessions. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.