Many people already have websites or a collection of pages. It is convenient to be able to replicate these files on the knarly platform, copying over html pages, folder structure files and maintaining file names. Likewise if i wish to share a collection of photos, documents and media, it can be tedious to have to recreate the order and the structure which i have put them into.
Uploading zip files is relatively straight forward. However uploading to knarly gives so much more power. You can search using a keyword for matching documents, edit individual documents, and wrap the document contents within you own template.
There are a few case studies for which this feature is being considered.
Case Studies
Upload a website:
An administrator wants to copy over an archive file containing the contents and structure of another website (written in HTML, or copied from generated HTML).They want to select a location for which the files will be uploaded to. This can be either the root directory '/' or another directory e.g. '/directory/'.
Note: It is assumed that all links within the archive HTML files are (created correctly and are) relative to one another regardless to the path that the archive directory sits on the domain, e.g. whether '/' or '/directory/' should not make a difference. It is impossible to restore broken links unless we can guess the path. Assuming this to be true we can safely recreate paths to the new files.
URL design:
/path_to_archive/directory_within_archive/somefile.html. The category will be determined first, the "path/somefile.html" path second and whether the file alias is a descendant.
Archive files to create category pages is rather essential. However whilst previous useage for the Alias parameter was relative to the root only /. It is obvious that this is no longer the case. The Alias must be permitted to be relative to the current directory. How this is done is undecided. Perhaps to make an item an alias to its parent path we omit the '/' and include it to be relative to the route.
Implementing your own
Currently the Archive Upload Tool is active in the Admin section /kadmin/general_site_settings/site_files/.Because this manipulates paths and can lead to conflicts of names this tool is reserved for Administrators and will fail for regular users.