public static class BoxRequestsFile.UploadFile extends BoxRequestUpload<BoxFile,BoxRequestsFile.UploadFile>
BoxRequestUpload.UploadRequestHandlerBoxRequest.BoxRequestHandler<R extends BoxRequest>, BoxRequest.ContentTypes, BoxRequest.MethodsmId, QUERY_FIELDSJSON_OBJECT, mBodyMap, mContentType, mHeaderMap, mListener, mQueryMap, mRequestMethod, mRequestUrlString, mRequiresSocket, mSession, mTimeout| Constructor and Description |
|---|
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
|
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, sendRequest, setCreatedDate, setHeaders, setModifiedDate, setProgressListener, setSha1, setUploadSizegetId, onSendCompleted, setFieldsbuildUrl, createHeaderMap, createQuery, equals, getIfMatchEtag, getIfNoneMatchEtag, getRequestHandler, getSession, getSocket, getStringBody, handleSendForCachedResult, handleToTaskForCachedResult, handleUpdateCache, hashCode, importRequestContentMapsFrom, logDebug, logRequest, onSend, parseHashMapEntry, parseJsonObject, send, setBody, setContentType, setIfMatchEtag, setIfNoneMatchEtag, setRequestHandler, setTimeOut, toTaskpublic 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 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()