Goal: designing and implementing a simple website to display and interact with a files/folders hierarchy. There is no need for authentication or user management. Using a frontend framework like bootstrap or foundation would be cool.
features:
-
main/root page is the top level of the hierarchy
-
at each level in the hierarchy and for each level in the hierarchy:
-
we should see a list of files and folders
-
breadcrumb trail
-
upload button / form to upload a new file
-
each element (file/folder) should have a name, type (folder has only one type, you can use extension or content-type for files) and creation date
-
show file size
-
when clicking a folder, navigate to this folder and see its content (different page)
-
when clicking a file, download it
-
sort list by name, type, date or size (for files)
-
displays the complete folders hierarchy to allow quick switch between folders (each folder is a link to its content)
requirements:
-
sql storage of your choice
-
folders and files hierarchy have to be stored in sql, file content in filesystem
-
rails application
-
tests or specs
-
like a filesystem, file and folder names should be unique within a given parent
-
rake task to generate an important number of folders and files with a depth of 8
-
performance: page should be fast to to display (especially when displaying the complete folders hierarchy generated by rake task)
Import
You can import a file struct by importer task, You can define you PATH by IMPORT_PATH env variable
“‘ IMPORT_PATH=/foo rake importer “`