Giter VIP home page Giter VIP logo

cumulus's People

Contributors

kstefanini avatar matcho avatar whatever22 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cumulus's Issues

Allow short path URLs returning all content

URLs representing a path, like /my/folder, should return the whole content available under this path.
For example something like:

{
  folders: [
    ...
  ],
  files: [
    ...
  ]
}

It could accept ?R switch (recursive).

Allow to call getFolderContents() on storage root

Currently, calling GET on / will display usage info and it is impossible to obtain the / folder contents.
Maybe move usage to /api/ ? The risk is having many users call / and consume a lot of resources to obtain something they don't want.

Prefix non-REST routes with /api

Routes such as /by-path or /search don't represent a resource but a service, ans as such are not really REST-compliant.
To avoid collision with resources, prefix all service routes with /api (for ex.).
The only remaining drawback will be : impossible to create a file / folder named "api" at the storage root.

Handle long file name

Either truncate file name or report specific error:

<br />
<b>Warning</b>:  mkdir(): File name too long in <b>/var/www/back/adapters/storage/stockagetb/StockageDisque.php</b> on line <b>123</b><br />
{"error":"disk storage: cannot create directory"}

Shift URL resources when using them

Unless #18 is implemented, elements of $this->resources should be array_shift()ed each time one is examined, so that an element is never used twice.

Especially when last elements are examined like /dl, they might conflict : what if a file has the dl keyword ?

Link to a fulltext indexer

A fulltext indexer (like Lucene) could index files and keep track of their Cumulus key. Additionnaly, CumulusService could propose a /fulltext entry point and / or a "fulltext" parameter for /search entrypoint.

PHP warnings breaks json response

Like in this response:

<br />
<b>Warning</b>:  mkdir(): File name too long in <b>/var/www/back/adapters/storage/stockagetb/StockageDisque.php</b> on line <b>123</b><br />
{"error":"disk storage: cannot create directory"}

Get "folders" under a path

A new service entry point could return all the "folders" directly (or indirectly, with ?R parameter) under a path. Such a "folder" would be defined as any path element containing at least one file or sub-"folder", and starting with the path given as argument.

Examples :
GET http://domain.tld/cumulus/get-folders/root/path
GET http://domain.tld/cumulus/get-folders/root/path?R

Other possibility : return the folders along with the files, for any "by-path" query (makes navigation easier)

Write more unit tests

Improve the unit test example URIs given in config/service.default.json to build a real testing set.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.