If you want your files or objects stored in the OCS were visible under your own domain, you must perform the following steps. Also remember that during set up, you will need access to the DNS management panel that handles your domain (usually the panel is made available by the supplier from whom you bought the domain).
- Log in through Oktawave admin panel to the OCS service.
- Create the container to which you want to connect your domain, you can give it any name, such as my-container.
- Set appropriate permissions on the container. If you want everyone to have access to its contents, make sure that the permissions of the container are set to public.
- Using the admin panel upload any test file (such as file.jpg) to container that was set up in the second point.
- Click on the file in the admin panel and copy (to Notepad for example) what is displayed on the right side of the file in the direct URL field. It should look similar to this address:
- Copy to clipboard the entire variable starting with AUTH expression. In our example: AUTH_867101b1-566b-43d8-b931-e5f9853b7297.
- Now log in to the management panel of your domain and create a new entry in it (always a CNAME) and associate it with the previously copied variable. It should look something like this:
files.mydomain.com CNAME my-container.AUTH-867101b1-566b-43d8-b931-e5f9853b7297.ocs-pl.oktawave.com.
That's all, now you can try to open the file in a browser using the address: http://files.mydomain.com/file.jpg.
What else should I look for?
- Remember that this solution will work for both plain HTTP and HTTPS, but if you want to enter https://pliki.mojadomena.com/plik.jpg in your browser, it will displays information about incorrect SSL certification. Therefore it is best to download files or objects only via HTTP.
- If you want to use the authentication mechanism to access specific containers, keep the following points:
- The authorization process and retrieve of the token should be carried out using the encrypted transmission using your https://ocs-pl.oktawave.com. Unencrypted connection to OCS (over HTTP) is supported, but totally not recommended during authentication, primarily due to the security of your data.
- Token acquired in the encrypted HTTPS authentication can be pass on to the application or the browser client and use it to download file, using your own domain address assigned to the container in the OCS via unencrypted HTTP connection. The resulting token is valid for a few minutes, and the expiration must be handled by the re-authorization, and download of a new token.