tsgrp / OpenContent

TSG's Web Services for ECM Repositories
8 stars 4 forks source link

REST Endpoint to Create a Contentless Object #53

Open benallenallen opened 9 years ago

benallenallen commented 9 years ago

Right now, the "/content/upload" endpoint requires that content be present in order to create objects in the repository.

Map<String, List<MultipartFile>> files = req.getMultiFileMap();
for (java.util.Map.Entry<String, List<MultipartFile>> entry : files.entrySet()) 
{
...
}

If you only pass in properties, the entire loop is skipped over and no objects are created. We could either:

  1. Change the /content/upload endpoint to be able to deal with contentless uploads (seems like the more logical choice)
  2. Create a new /content/create? endpoint that only deals with contentless objects
dgrumieaux commented 9 years ago

There may already exist a restful create content method that could be more appropriate. I believe it is named restfulPutContent, or something like that. On Feb 5, 2015 8:24 AM, "benallenallen" notifications@github.com wrote:

Right now, the "/content/upload" endpoint requires that content be present in order to create objects in the repository.

Map<String, List> files = req.getMultiFileMap();for (java.util.Map.Entry<String, List> entry : files.entrySet()) {... }

If you only pass in properties, the entire loop is skipped over and no objects are created. We could either:

  1. Change the /content/upload endpoint to be able to deal with contentless uploads (seems like the more logical choice)
  2. Create a new /content/create? endpoint that only deals with contentless objects

— Reply to this email directly or view it on GitHub https://github.com/tsgrp/OpenContent/issues/53.