The org.opencode4workspace.endpoints.FilePostToSpaceEndpoint is used to post a file to a Space and retrieve a FileResponse object corresponding to a successful posting.
...
If the posting is successful, a FileResponse object is returned comprising the String id of the file, the String name of the file, the int size of the file in bytes, a Map of URLs for the file (metadata, no-redirect download, and redirect download), the Long created timestamp, the String id of the creator and the String contentType of the file.
...
title | Image Size Not Supported |
---|
...
.
...
Examples
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
File file = new File("C:/Temp/test.doc"); FileResponse response = client.postFileToSpace(file, spaceId); assert (!"".equals(response.getName())); assert (appId.equals(response.getCreatedBy())); |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
File photo = new File("C:/Temp/testPhoto.jpg"); FileResponse response = client.postFileToSpace(photo, spaceId, "50x50"); assert (!"".equals(response.getName())); assert (appId.equals(response.getCreatedBy())) |