The uploadlargefile.do call uploads a single file as a set of parts to an existing build or creates a build. Uploading the file in parts avoids timeout errors, which can occur when uploading a large file using the uploadfile.do call.

Veracode recommends using this call as an alternative to the uploadfile.do call. Before using this API, Veracode strongly recommends that you read API Usage and Access Guidelines.
Before uploading additional files, ensure that:
  • An upload or prescan is not in progress.
  • The beginscan.do call is not in progress.
  • If you recently ran the beginscan.do call, you did not set auto_scan to true.

Since the uploadlargefile.do call creates a build, if one does not already exist or if the most recent build has a published static scan, you do not need to call createbuild.do. If the call creates a build, the build name is the date of the build with the scan type. For example, 03 Mar 2019 Static.

If you want to upload a file that does not have the same name as a previous file, you can use the filename parameter to change the name, enabling flaw-matching with previously scanned files.

Resource URL



app_id Integer. Required. Specify the value as a query argument in the resource URL.
file The file to upload. Required. The maximum file size is 2GB.
  • Set Content-Length: <number of bytes in the file>
  • Set Content-Type: binary/octet-stream
  • Specify the value as a query argument in the resource URL.
Note: You must enter the @ symbol before the entire pathname, including the specific filename.
filename String. Optional. Enter a new unique filename for the uploaded file. The filename cannot begin or end with slashes or periods.Specify the value as a query argument in the resource URL.
sandbox_id Integer. Optional. Enter the ID of the target sandbox for the upload file. Specify the value as a query argument in the resource URL.

Java Example

java -jar vosp-api-wrappers-java-<version #>.jar -vid <VeracodeApiId> -vkey <VeracodeApiKey> -action uploadlargefile -appid <app id> -filepath c:\Users\<username>\<filename>

Java Results

The uploadlargefile.do call returns the filelist XML document, which references the filelist.xsd. Additional filelist.xsd schema documentation is available. Use the XSD file to validate the XML data.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<filelist xmlns="https://analysiscenter.veracode.com/schema/2.0/filelist" 
      account_id=<account id> app_id=<app id> build_id=<build id> filelist_version="1.1" 
   <file file_id=<file id> file_name="<filename>" file_status="Uploaded"/>