@RestController @RequestMapping(value="/api/2/webdav") public class WebdavController extends Object
| Modifier and Type | Field and Description |
|---|---|
protected WebDavService |
webDavService
The webdav service
|
| Constructor and Description |
|---|
WebdavController(WebDavService webDavService) |
| Modifier and Type | Method and Description |
|---|---|
ResultList<WebDavItem> |
listItems(String siteId,
String profileId,
String path,
String type)
List items in a WebDAV server
|
ResultOne<WebDavItem> |
uploadItem(javax.servlet.http.HttpServletRequest request)
Uploads a file to a WebDAV server
|
protected WebDavService webDavService
public WebdavController(WebDavService webDavService)
@GetMapping(value="list") public ResultList<WebDavItem> listItems(@RequestParam(value="siteId") String siteId, @RequestParam(value="profileId") String profileId, @RequestParam(value="path",required=false,defaultValue="") String path, @RequestParam(value="type",required=false,defaultValue="") String type) throws WebDavException
siteId - the id of the siteprofileId - the id of the webdav profilepath - the path to listtype - the type of items to filterWebDavException - if there is any error connecting to the WebDAV server@PostMapping(value="/upload") public ResultOne<WebDavItem> uploadItem(javax.servlet.http.HttpServletRequest request) throws IOException, WebDavException, InvalidParametersException
request - the requestIOException - if there is any error reading the content of the fileWebDavException - if there is any error uploading the file to the WebDAV serverInvalidParametersException - if there is any error parsing the requestCopyright © 2020 CrafterCMS. All rights reserved.