dkt-projekt / DocumentStorage

0 stars 0 forks source link

Why is there no endpoint for creating collections? #17

Closed davidwabnitz closed 8 years ago

davidwabnitz commented 8 years ago

Are collections created implicitly when POSTing a file to a collection that doesn't exist? Anyhow I think it would be a good idea to have a separate PUT operation for a collection (if you want to provide the collection name yourself) and preferably a POST operation for creating a new collection with a guid that is generated by the backend, where you can POST collection metadata, like collection name, description, and in future maybe such things as public/private settings.

jnehring commented 8 years ago

We can do this. Is this a requirement for your use case? Currently you create the collection when you upload the first document to it because this is so simple.

jnehring commented 8 years ago

I implemented this behaviour (see readme). Now, when you upload a file and the collection does not exist, then it returns an error. You have to create a collection before you upload a file.

@jmschnei please note that the endpoint to upload a file (see readme) has changed.