saasufy-components 10.5.1 → 10.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -211,19 +211,21 @@ After adding a record to Saasufy which holds a file in one of its fields, that f
|
|
|
211
211
|
The format of the URL to link directly to a specific file/image is:
|
|
212
212
|
|
|
213
213
|
```
|
|
214
|
-
https
|
|
214
|
+
https://:serviceId.saasufy.com/files/:modelName/:modelId/:fieldName
|
|
215
215
|
```
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
Each service serves its files on a subdomain of its own, named after the service.
|
|
217
|
+
The `:serviceId` is the `sid` part of the URL for your Saasufy service (which you get after deploying your service); if that URL is `wss://saasufy.com/sid7999/socketcluster/`, then your service ID is `sid7999`.
|
|
218
|
+
|
|
219
|
+
So if your file is stored inside an `Image` model with ID `58f2051c-14bc-4518-8816-ff387cfdd57e` inside a `data` field, you will be able to link to your image directly using this URL:
|
|
218
220
|
|
|
219
221
|
```
|
|
220
|
-
https://saasufy.com/
|
|
222
|
+
https://sid7999.saasufy.com/files/Image/58f2051c-14bc-4518-8816-ff387cfdd57e/data
|
|
221
223
|
```
|
|
222
224
|
|
|
223
225
|
You can use it to embed images into your application using the `<img>` tag like this:
|
|
224
226
|
|
|
225
227
|
```html
|
|
226
|
-
<img src="https://saasufy.com/
|
|
228
|
+
<img src="https://sid7999.saasufy.com/files/Image/58f2051c-14bc-4518-8816-ff387cfdd57e/data" alt="My image" />
|
|
227
229
|
```
|
|
228
230
|
|
|
229
231
|
Saasufy enforces access controls for HTTP in the same way as it does for its WebSocket protocol.
|