Readme.md 1.6 KiB

123456789101112131415161718192021222324252627282930313233
  1. # Raw — Nextcloud raw file server
  2. Raw simply returns any requested file, so you can link directly to a file itself (i.e. without any
  3. of NextCloud's interface around it). This enables you to host static web pages, images or other
  4. files, for example to link/embed them elsewhere on the web.
  5. For security and privacy, the content is served with a [Content-Security-Policy][] header. This
  6. header instructs browsers to not load any remote content, nor execute any scripts that it may
  7. contain (of course, the downside is that your web pages cannot use javascript for interactivity).
  8. ## Usage
  9. The common usage is to first share a file and enable public access through a link. If the share link
  10. is `https://my-nextcloud/s/aBc123DeF456xyZ`, then this app will provide access to the raw file at
  11. `https://my-nextcloud/apps/raw/s/aBc123DeF456xyZ`. If the share is a folder, the files within it
  12. are accessible as e.g. `https://my-nextcloud/apps/raw/s/aBc123DeF456xyZ/path/to/file`.
  13. A user can also access their own private files. For example, a file named `test.html` in anansi's
  14. Documents folder would be available at `https://my-nextcloud/apps/raw/u/anansi/Documents/test.html`.
  15. ## Installation
  16. Clone this repo into your Nextcloud installation's `/apps` (or `/custom_apps`) folder, ensuring the
  17. folder's name is `raw`:
  18. git clone https://code.treora.com/gerben/nextcloud-raw raw
  19. Then log into Nextcloud as admin, find and enable it in the list of apps.
  20. This app is currently not published in the Nextcloud app store.
  21. [Content-Security-Policy]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy