public class FileClient
extends Object
Modifier and Type | Method and Description |
---|---|
DownloadFileResponseBody |
downloadFile(DownloadFileRequest request)
Downloads files from an attachment field in an app.
|
InputStream |
downloadFile(String fileKey)
Downloads files from an attachment field in an app.
|
String |
uploadFile(Path path,
String contentType)
Uploads a file to Kintone.
|
UploadFileResponseBody |
uploadFile(UploadFileRequest request)
Uploads a file to Kintone.
|
public InputStream downloadFile(String fileKey) throws IOException
fileKey
- the value that is set on the Attachment field in the response data returned when
using the Get Record APIIOException
- if an I/O error occurspublic DownloadFileResponseBody downloadFile(DownloadFileRequest request)
request
- the request parameters. See DownloadFileRequest
DownloadFileResponseBody
public String uploadFile(Path path, String contentType) throws IOException
path
- the file to uploadcontentType
- the Content Type of the file.IOException
- if an I/O error occurspublic UploadFileResponseBody uploadFile(UploadFileRequest request)
request
- the request parameters. See UploadFileRequest
UploadFileResponseBody