You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -112,29 +112,41 @@ These settings can be overriden using dedicated flags:
112
112
113
113
## Fetching a manifest for a publication
114
114
115
-
In its current version, the `serve`command relies on a single path from which all manifests can be fetched: `/{base64url-encoded-path-to-file}/manifest.json`.
115
+
In its current version, the `serve`command relies on a single path from which all manifests can be fetched: `/webpub/{base64url-encoded-path-to-file}/manifest.json`.
116
116
117
117
Each scheme supports a dedicated URI scheme:
118
118
119
119
| Scheme | URI scheme | Path |
120
120
| ------ | ---------- | ---- |
121
-
| Filesystem |`file://`| Path to a given file relative to the path provided in`--file-directory`.
121
+
| Filesystem |*(none)*| Path to a given file relative to the path provided in`--file-directory`. Used directly without a URI scheme prefix. |
122
122
| HTTP |`http://`| URL |
123
123
| HTTPS |`https://`| URL |
124
124
| S3 |`s3://`| Path to a bucket, followed by a path to a file (key) in that bucket: `s3://{bucket}/{path-to-file}`|
125
125
| Google Cloud Storage |`gs://`| Path to a bucket, followed by a path to a file (key) in that bucket: `gs://{bucket}/{path-to-file}`|
126
126
127
-
Once calculated, the URI scheme and path to the file have to be [base64url](https://datatracker.ietf.org/doc/html/rfc4648#section-5) encoded in order to generate a path to a manifest.
127
+
Once calculated, the path (with its URI scheme, where applicable) has to be [base64url](https://datatracker.ietf.org/doc/html/rfc4648#section-5) encoded (without padding)in order to generate a path to a manifest.
128
128
129
-
### Example
129
+
### Examples
130
+
131
+
#### Filesystem
132
+
133
+
```sh
134
+
readium serve --file-directory /srv/epubs/
135
+
```
136
+
137
+
* I'd like to stream `example_epub.epub` from a local directory `/srv/epubs/`
138
+
* We base64url-encode (without padding) the path relative to `--file-directory`, which in this case is just the filename `example_epub.epub` → `ZXhhbXBsZV9lcHViLmVwdWI`
139
+
* The manifest for that file can be accessed at <http://localhost:15080/webpub/ZXhhbXBsZV9lcHViLmVwdWI/manifest.json>
140
+
141
+
#### HTTPS
130
142
131
143
```sh
132
144
readium serve -s gs,https
133
145
```
134
146
135
147
* I'd like to stream <https://github.com/IDPF/epub3-samples/releases/download/20230704/accessible_epub_3.epub>
136
-
* Which can be base64url encoded to `aHR0cHM6Ly9naXRodWIuY29tL0lEUEYvZXB1YjMtc2FtcGxlcy9yZWxlYXNlcy9kb3dubG9hZC8yMDIzMDcwNC9hY2Nlc3NpYmxlX2VwdWJfMy5lcHVi`
137
-
* The manifest for that file can be accessed at <http://localhost:15080/aHR0cHM6Ly9naXRodWIuY29tL0lEUEYvZXB1YjMtc2FtcGxlcy9yZWxlYXNlcy9kb3dubG9hZC8yMDIzMDcwNC9hY2Nlc3NpYmxlX2VwdWJfMy5lcHVi/manifest.json>
148
+
* Which can be base64url encoded (without padding) to `aHR0cHM6Ly9naXRodWIuY29tL0lEUEYvZXB1YjMtc2FtcGxlcy9yZWxlYXNlcy9kb3dubG9hZC8yMDIzMDcwNC9hY2Nlc3NpYmxlX2VwdWJfMy5lcHVi`
149
+
* The manifest for that file can be accessed at <http://localhost:15080/webpub/aHR0cHM6Ly9naXRodWIuY29tL0lEUEYvZXB1YjMtc2FtcGxlcy9yZWxlYXNlcy9kb3dubG9hZC8yMDIzMDcwNC9hY2Nlc3NpYmxlX2VwdWJfMy5lcHVi/manifest.json>
138
150
139
151
## Additional services
140
152
@@ -145,4 +157,4 @@ In its current version, the CLI provides the following services:
0 commit comments