Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
yaron_ganor
Explorer

I am glad to expose a great new feature that our team has been working on and will be added to HANA Cloud Portal's next release.

This feature enhances the capabilities of our recently debuted Document Repository.

Mid next week you will notice that a new folder – Public - has been added to your folder tree.

In this folder you can put your files (documents, presentations, images, logos, less etc.) and have anyone on the internet access them without authentication.

This functionality enormously enhances your ability to build your company's public site with all its resources without having to worry about where to place all those building blocks and artifacts.

From now on they all go in their designated folder - Public.

To make it easier for you to control the clutter, you can create any hierarchy of folders under the Public folder and anything inside this hierarchy is immediately made available to you for use as a public resource.

The beauty of this folder is that you can automatically get the public link to the file, based on its path in the repository, and immediately use it in your site.

For ease of use, we generate the public URLs in advance so that when you hover over the "Share Link" label, you immediately get the public URL of each file.

Note that the textual link "/portal/v1/contentRepository/Public/..." reveals a relative path to your file and uses a specially designed service to serve anonymous requests to your content.

The relative URL can be copied and used in a LESS file or a Rich Text Editor widget in a site etc.

It's as simple as adding an img tag with a relative src attribute:

<img src="/portal/v1/contentRepository/Public/big_logo.jpg"/>

In the RTE widget you can even use the "Image" button and the dedicated dialog to add the URL.

In addition to the relative URL, and again for your convenience, we expose the full URL to each file behind the "Open Document" link.

Note that the use of the full URL inside LESS files and widgets of any kind in a site may hinder your ability to transport your work to a different account that is independent of the original repository.

(more on this in a future post – Transporting Public Content)

Keep in mind that the Public folder is a system folder and as such it cannot be modified or deleted.

At this stage there can only be one Public folder in the repository and nothing in it can be private.

Whatever you upload to this folder can be freely accessed from the internet until you delete it.

Transport at a glance

We also took the liberty of thinking ahead and for those of you who plan on exporting your work and then importing it to a different account, we made the effort of adding all the public content to the zip file so you don’t have to bother with uploading it over and over again.

When you import the site you can choose whether to override existing files in the repository or to have the service create duplicates.

(more on this in a future post – Transporting Public Content)