Retrieves the current metadata of a ChunkedUpload.

@param accountId The external account number (int) or account ID Guid. (required)
@param chunkedUploadId  (required)
@return ChunkedUploadResponse
197624
public ChunkedUploadResponse getChunkedUpload(String accountId, String chunkedUploadId) throws ApiException {
    return getChunkedUpload(accountId, chunkedUploadId, null);
  }
805501
public BoxFile.Info getFileInfo(String fileID) {
        URL url = FILE_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), fileID);
        BoxAPIRequest request = new BoxAPIRequest(this.api, url, "GET");
        BoxJSONResponse response = (BoxJSONResponse) request.send();
        JsonObject jsonObject = JsonObject.readFrom(response.getJSON());

        BoxFile file = new BoxFile(this.api, jsonObject.get("id").asString());
        return file.new Info(response.getJSON());
    }
1159134
public static byte[] stringToId(final String branch_id) {
    if (branch_id == null || branch_id.isEmpty()) {
      throw new IllegalArgumentException("Branch ID was empty");
    }
    if (branch_id.length() < 4) {
      throw new IllegalArgumentException("Branch ID was too short");
    }
    String id = branch_id;
    if (id.length() % 2 != 0) {
      id = "0" + id;
    }
    return DatatypeConverter.parseHexBinary(id);
  }
54941
public String getFileThumbnailUrl(final String fileId) {
		FileWidgetUpload file = getFile(fileId);
		if (file == null) {
			return null;
		}

		// Check static resource
		Image thumbnail = file.getThumbnail();
		if (thumbnail instanceof InternalResource) {
			return ((InternalResource) thumbnail).getTargetUrl();
		}

		Environment env = getEnvironment();
		Map<String, String> parameters = env.getHiddenParameters();
		parameters.put(Environment.TARGET_ID, getTargetId());

		if (Util.empty(file.getThumbnailCacheKey())) {
			// Add some randomness to the URL to prevent caching
			String random = WebUtilities.generateRandom();
			parameters.put(Environment.UNIQUE_RANDOM_PARAM, random);
		} else {
			// Remove step counter as not required for cached content
			parameters.remove(Environment.STEP_VARIABLE);
			parameters.remove(Environment.SESSION_TOKEN_VARIABLE);
			// Add the cache key
			parameters.put(Environment.CONTENT_CACHE_KEY, file.getThumbnailCacheKey());
		}

		// File id
		parameters.put(FILE_UPLOAD_ID_KEY, fileId);

		// Thumbnail flag
		parameters.put(FILE_UPLOAD_THUMB_NAIL_KEY, "Y");

		// The targetable path needs to be configured for the portal environment.
		String url = env.getWServletPath();

		// Note the last parameter. In javascript we don't want to encode "&".
		return WebUtilities.getPath(url, parameters, true);
	}
1291433
public static BaasResult<BaasStream> streamImageAssetSync(String id, int sizeId) {
        return BaasAsset.doStreamSync(id, null, sizeId);
    }
197112
public long chunkedUploadAppend(String uploadId, long uploadOffset, byte[] data)
        throws DbxException
    {
        return chunkedUploadAppend(uploadId, uploadOffset, data, 0, data.length);
    }
699622
public int getChunkForKey(byte[] key) throws IllegalStateException {
        if(numChunks == 0) {
            throw new IllegalStateException("The ChunkedFileSet is closed.");
        }

        switch(storageFormat) {
            case READONLY_V0: {
                return ReadOnlyUtils.chunk(ByteUtils.md5(key), numChunks);
            }
            case READONLY_V1: {
                if(nodePartitionIds == null) {
                    throw new IllegalStateException("nodePartitionIds is null.");
                }
                List<Integer> routingPartitionList = routingStrategy.getPartitionList(key);
                routingPartitionList.retainAll(nodePartitionIds);

                if(routingPartitionList.size() != 1) {
                    throw new IllegalStateException("The key does not belong on this node.");
                }

                return chunkIdToChunkStart.get(routingPartitionList.get(0))
                       + ReadOnlyUtils.chunk(ByteUtils.md5(key),
                                             chunkIdToNumChunks.get(routingPartitionList.get(0)));
            }
            case READONLY_V2: {
                List<Integer> routingPartitionList = routingStrategy.getPartitionList(key);

                Pair<Integer, Integer> bucket = null;
                for(int replicaType = 0; replicaType < routingPartitionList.size(); replicaType++) {
                    if(nodePartitionIds == null) {
                        throw new IllegalStateException("nodePartitionIds is null.");
                    }
                    if(nodePartitionIds.contains(routingPartitionList.get(replicaType))) {
                        if(bucket == null) {
                            bucket = Pair.create(routingPartitionList.get(0), replicaType);
                        } else {
                            throw new IllegalStateException("Found more than one replica for a given partition on the current node!");
                        }
                    }
                }

                if(bucket == null) {
                    throw new IllegalStateException("The key does not belong on this node.");
                }

                Integer chunkStart = chunkIdToChunkStart.get(bucket);

                if (chunkStart == null) {
                    throw new IllegalStateException("chunkStart is null.");
                }

                return chunkStart + ReadOnlyUtils.chunk(ByteUtils.md5(key), chunkIdToNumChunks.get(bucket));
            }
            default: {
                throw new IllegalStateException("Unsupported storageFormat: " + storageFormat);
            }
        }

    }
751649
public GetIndividualProfilesRequest withIndividualId(final int id) {
        this.id = id;
        this.password = new char[0];
        this.login = this.accountNumber = this.routingNumber = null;
        return this;
    }
489240
public function getGameDataChunkContent($region, $gameId, $chunkId)
    {
        return file_get_contents($this->getGameDataChunkPath($region, $gameId, $chunkId));
    }
1121123
public BoxRequestsFile.DeleteTrashedFile getDeleteTrashedFileRequest(String id) {
        BoxRequestsFile.DeleteTrashedFile request = new BoxRequestsFile.DeleteTrashedFile(id, getTrashedFileUrl(id), mSession);
        return request;
    }
489787
private <RequestT, ResponseT> ResponseT uploadObject(final InputStream originalStream,
                                                         final File file,
                                                         final ObjectMetadata metadata,
                                                         final ProgressListener listener,
                                                         final Request<RequestT> request,
                                                         final S3DataSource originalRequest,
                                                         final boolean skipServerSideValidation,
                                                         final boolean skipClientSideValidationPerRequest,
                                                         final UploadObjectStrategy<RequestT, ResponseT> uploadStrategy,
                                                         final boolean setContentTypeIfNotProvided) {

        InputStream input = getInputStream(originalStream, file, metadata, request,
                                           skipServerSideValidation, setContentTypeIfNotProvided);

        final ObjectMetadata returnedMetadata;
        MD5DigestCalculatingInputStream md5DigestStream = null;
        try {
            if (metadata.getContentMD5() == null && !skipClientSideValidationPerRequest) {
                /*
                 * If the user hasn't set the content MD5, then we don't want to buffer the whole
                 * stream in memory just to calculate it. Instead, we can calculate it on the fly
                 * and validate it with the returned ETag from the object upload.
                 */
                input = md5DigestStream = new MD5DigestCalculatingInputStream(input);
            }

            populateRequestMetadata(request, metadata);
            request.setContent(input);
            publishProgress(listener, ProgressEventType.TRANSFER_STARTED_EVENT);
            try {
                returnedMetadata = uploadStrategy.invokeServiceCall(request);
            } catch (Throwable t) {
                publishProgress(listener, ProgressEventType.TRANSFER_FAILED_EVENT);
                throw failure(t);
            }
        } finally {
            cleanupDataSource(originalRequest, file, originalStream, input, log);
        }

        String contentMd5 = metadata.getContentMD5();
        if (md5DigestStream != null) {
            contentMd5 = Base64.encodeAsString(md5DigestStream.getMd5Digest());
        }

        final String etag = returnedMetadata.getETag();
        if (contentMd5 != null && !skipMd5CheckStrategy.skipClientSideValidationPerPutResponse(returnedMetadata)) {
            byte[] clientSideHash = BinaryUtils.fromBase64(contentMd5);
            byte[] serverSideHash = BinaryUtils.fromHex(etag);

            if (!Arrays.equals(clientSideHash, serverSideHash)) {
                publishProgress(listener, ProgressEventType.TRANSFER_FAILED_EVENT);
                throw new SdkClientException(
                    "Unable to verify integrity of data upload. Client calculated content hash (contentMD5: " + contentMd5
                    + " in base 64) didn't match hash (etag: " + etag + " in hex) calculated by Amazon S3.  "
                    + "You may need to delete the data stored in Amazon S3. (metadata.contentMD5: " + metadata.getContentMD5()
                    + ", md5DigestStream: " + md5DigestStream
                    + uploadStrategy.md5ValidationErrorSuffix()
                    + ")");
            }
        }

        publishProgress(listener, ProgressEventType.TRANSFER_COMPLETED_EVENT);

        return uploadStrategy.createResult(returnedMetadata, contentMd5);
    }
492447
function(id) {
            var uploadDataEntry = this.getUploads({id: id}),
                parentId = null;

            if (uploadDataEntry) {
                if (uploadDataEntry.parentId !== undefined) {
                    parentId = uploadDataEntry.parentId;
                }
            }

            return parentId;
        }
780497
def upload_chunk(self):
        
        self._retried = 0
        self._do_request()
        self.offset = int(self.request.response_headers.get('upload-offset'))
        if self.log_func:
            msg = '{} bytes uploaded ...'.format(self.offset)
            self.log_func(msg)
1134329
public function getBulkUploadStatus($batchId)
    {
        if (empty($batchId) || !is_int($batchId)) {
            throw new \Exception('Invalid $batchId provided in ' . __METHOD__);
        }

        return $this->getResult('getBulkUploadStatus', array('batchId' => $batchId));
    }
44756
public FileWidgetUpload getFile(final String fileId) {
		for (FileWidgetUpload file : getFiles()) {
			if (Util.equals(file.getFileId(), fileId)) {
				return file;
			}
		}
		return null;
	}
1259280
function(id, uploadId) {
            getHeaders(id, uploadId).then(function(headers, endOfUrl) {
                options.log("Submitting S3 Abort multipart upload request for " + id);
                requester.initTransport(id)
                    .withPath(endOfUrl)
                    .withHeaders(headers)
                    .send();
            });
        }
165531
protected String getUploadSessionForNewFileVersionUrl(final String id) {
        return String.format(Locale.ENGLISH, "%s/files/%s/upload_sessions", getBaseUploadUri(), id);
    }