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.
Files changed (2) hide show
  1. package/README.md +7 -5
  2. 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://saasufy.com/:serviceId/files/:modelName/:modelId/:fieldName
214
+ https://:serviceId.saasufy.com/files/:modelName/:modelId/:fieldName
215
215
  ```
216
- For example, if the URL for your Saasufy service (which you get after deploying your service) is `wss://saasufy.com/sid7999/socketcluster/`
217
- and 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:
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/sid7999/files/Image/58f2051c-14bc-4518-8816-ff387cfdd57e/data
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/sid7999/files/Image/58f2051c-14bc-4518-8816-ff387cfdd57e/data" alt="My image" />
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saasufy-components",
3
- "version": "10.5.1",
3
+ "version": "10.5.2",
4
4
  "description": "Components for Saasufy.",
5
5
  "main": "index.js",
6
6
  "scripts": {