Is there an InProcess API call I can use to read a file uploaded to the theme supplementary files?
Is there an InProcess API call I can use to read a file uploaded to the theme supplementary files?
What is it you are trying to accomplish?
I guess I'm looking to have one of my deisgners be able to upload stuff in a central location and read it with code - preferably somewhere in the administration area - Site files would work...can I read from there?
We were storing some stuff in a plugin config, but the content she was uploading was too large.
In general, we don't recommend directly accessing CFS file stores that you don't own. Instead, I'd recommend creating your own file store for this purpose.
That said, CFS files can be read through the CentralizedFileStorage API ( https://community.telligent.com/community/11/w/api-documentation/63964/centralizedfilestorage-in-process-api-service ). Here's a trailing document on the CFS and using the API: https://community.telligent.com/community/11/w/developer-training/65093/centralized-file-storage
We looked at something similar for our community.
CFS is good for developers, since it's accessible from C# code in various places that need an icon, e.g.
public string PreviewImageUrl => CentralizedFileStorage.GetGenericDownloadUrl("e14core", "images.rte", "e14-icon-product.png");
We were initially thinking it might be ok for our designers, but the URLs you need to use aren't particularly friendly & need some translating, e.g. a file in this folder..
/e14core/libraries/galleria/themes/classic/classic-loader.gif
.. ends up needing to look like..
/cfs-file/__key/e14core/libraries-galleria-themes-classic/classic_2D00_loader.gif
That's a chore for the designers to work with.
We ended up using CFS just for the developers, and have a GitHub repo for our designers to use. When they check in their files, it'll trigger a deployment job to copy the changes into a public Storage Account in Azure.. the URLs are then easy to work with & their changes are available in production within a few minutes.
That approach also keeps their work separate from development, which is preferable.
We looked at something similar for our community.
CFS is good for developers, since it's accessible from C# code in various places that need an icon, e.g.
public string PreviewImageUrl => CentralizedFileStorage.GetGenericDownloadUrl("e14core", "images.rte", "e14-icon-product.png");
We were initially thinking it might be ok for our designers, but the URLs you need to use aren't particularly friendly & need some translating, e.g. a file in this folder..
/e14core/libraries/galleria/themes/classic/classic-loader.gif
.. ends up needing to look like..
/cfs-file/__key/e14core/libraries-galleria-themes-classic/classic_2D00_loader.gif
That's a chore for the designers to work with.
We ended up using CFS just for the developers, and have a GitHub repo for our designers to use. When they check in their files, it'll trigger a deployment job to copy the changes into a public Storage Account in Azure.. the URLs are then easy to work with & their changes are available in production within a few minutes.
That approach also keeps their work separate from development, which is preferable.