How to correctly use KurocoFiles and KurocoFront to manages images & files
There are two ways to manage images and files in Kuroco:
- Using KurocoFiles
- Using KurocoFront
This tutorial explains each feature and the appropriate upload location according to the usage scene.
KurocoFiles is an upload feature that can upload files from the management page.
You can view the uploaded files from [Files] -> [KurocoFiles] on the management page.
KurocoFront is a static content hosting service that uses a CDN.
By linking with GitHub, you can upload files on KurocoFront.
About proper use of KurocoFiles and KurocoFront
We will explain whether it is better to use KurocoFiles or KurocoFront to upload images and files.
When KurocoFiles is better
It is recommended to use KurocoFiles for files you update periodically, such as images displayed on the pages.
When KurocoFront is better
It is recommended to use KurocoFront's assets for HTML, JS, or CSS files.
Since major front-end frameworks have a feature to attach a hash to the file path to make it easier to clear the cache, it is not appropriate to upload the file with a hash in the URL to share.
(There is also locating method without hashing using the front-end framework's functions such as the folder upload.)
Both KurocoFiles and KurocoFront have an image optimization function, so you won't need to work on that.
Reference: Dynamic conversion of images
Cache clearing mechanism
In the case of KurocoFiles
CDN cache gets cleared when a file is updated.
In the case of KurocoFront
It is updated in a batch from Github for each commit hash, and the CDN cache gets cleared in a batch.
About the cost
Transferring cost is all the same.
But for KurocoFront, since a file is stored in every commit hash, additional storage cost is incurred.
In addition, KurocoFront is using Github Actions for building and deployment. Therefore, please note that if the file size used by Kuroko Front is large, Github charges may also be incurred.
The difference between KurocoFiles and KurocoFront has been explained above. Below is the summary:
|Recommended case||Frequently updated files, such as images displayed on pages||HTML, JS, or CSS files|
|Managing location||Kuroco management screen||Github repositories|
|Cache clearing timing||When files are updated||After batch update from each commit hash via Github|
|Cost||storage / transferring cost||storage / transferring cost and Github Actions cost|
It's not required to strictly follow the recommended use. Please consult with the site operator to decide.
If you have any questions, feel free to contact us via Contact form.