For a term paper, I need to write a cloud data storage (a simplified version of Dropbox / Google Drive). NodeJS must be used as a language. I created a server on Express, and implemented the ability to upload a file to the server, and then store it in a Mongo-> GridFS database . But how to organize a directory tree, something like a file system. There is an idea to use one collection in Mongo to store the tree, the end points are documents containing the file ID in the GridFS.

  1. Is it a bicycle?
  2. Is there an already implemented npm module for creating such a hierarchy (the available wrappers for GridFS FUSE are not complete and do not allow you to create folders).
  • Monsieur, you do not write a doctoral, and coursework. The bike from you is quite suitable. Organize a tree based on the requirements. What could be there? Public folder, closed folder accessible by authorization. Suppose 2 folders. Organize according to access so that some sort of Vasily Pupkin changing the request does not look at the naughty photos of Maria Popkina))). This is if the condition is multiplayer functionality. Storage of the entire tree in the database, why? Well, I still understand the way to store each document so that once again the recursion does not look for files - Dimka
  • @Dimka According to the functional requirements, it’s just a multiplayer functionality. And the use of Heroku as a deploy platform imposes restrictions on storing files locally, therefore the mLab database is used - ZulusK
  • Do you have to do it on Heroka? local server can not be collected? - Dimka
  • @ Dimka lecturer demanding - ZulusK

0