public static class BoxRequestsFile.UploadFile extends BoxRequestUpload<BoxFile,BoxRequestsFile.UploadFile>
BoxRequest.BoxRequestHandler, BoxRequest.ContentTypes, BoxRequest.MethodsmBodyMap, mContentType, mHeaderMap, mListener, mQueryMap, mRequestMethod, mRequestUrlString, mSession| Constructor and Description |
|---|
BoxRequestsFile.UploadFile(java.io.File file,
java.lang.String destinationFolderId,
java.lang.String requestUrl,
BoxSession session)
Creates an upload file from file request with the default parameters
|
BoxRequestsFile.UploadFile(java.io.InputStream inputStream,
java.lang.String fileName,
java.lang.String destinationFolderId,
java.lang.String requestUrl,
BoxSession session)
Creates an upload file from input stream request with the default parameters
|
| Modifier and Type | Method and Description |
|---|---|
protected com.box.androidsdk.content.requests.BoxRequestMultipart |
createMultipartRequest() |
java.lang.String |
getDestinationFolderId()
Returns the destination folder id for the uploaded file.
|
java.lang.String |
getFileName()
Returns the name of the file to upload.
|
BoxRequestsFile.UploadFile |
setFileName(java.lang.String mFileName)
Sets the name of the file to upload.
|
createHttpRequest, getCreatedDate, getFile, getInputStream, getModifiedDate, getSha1, getUploadSize, send, setCreatedDate, setHeaders, setModifiedDate, setProgressListener, setSha1, setUploadSizebuildUrl, createQuery, getIfMatchEtag, getIfNoneMatchEtag, getRequestHandler, getSession, getStringBody, importRequestContentMapsFrom, logDebug, parseHashMapEntry, parseJsonObject, setBody, setContentType, setIfMatchEtag, setIfNoneMatchEtag, setRequestHandler, setTimeOut, toTaskpublic BoxRequestsFile.UploadFile(java.io.InputStream inputStream,
java.lang.String fileName,
java.lang.String destinationFolderId,
java.lang.String requestUrl,
BoxSession session)
inputStream - input stream of the filefileName - name of the new filedestinationFolderId - id of the parent folder for the new filerequestUrl - URL of the upload file endpointsession - the authenticated session that will be used to make the request withpublic BoxRequestsFile.UploadFile(java.io.File file,
java.lang.String destinationFolderId,
java.lang.String requestUrl,
BoxSession session)
file - file to uploaddestinationFolderId - id of the parent folder for the new filerequestUrl - URL of the upload file endpointsession - the authenticated session that will be used to make the request withprotected com.box.androidsdk.content.requests.BoxRequestMultipart createMultipartRequest()
throws java.io.IOException,
BoxException
createMultipartRequest in class BoxRequestUpload<BoxFile,BoxRequestsFile.UploadFile>java.io.IOExceptionBoxExceptionpublic java.lang.String getFileName()
public BoxRequestsFile.UploadFile setFileName(java.lang.String mFileName)
mFileName - name of the file to upload.public java.lang.String getDestinationFolderId()