8.1.12.1. Individual file processing

By default, a payload in REST body request is expected when user triggers a scan request on MetaDefender Core, but now you could only need to specify a direct download link for that payload in REST request by setting downloadfrom header mentioned in 8.1.3.1. Process a file .

Once setting up properly on file analysis request, Core will proactively download file and use it as a payload for further processing as usual.

Successful response

HTTP status code: 200

{
"data_id": "61dffeaa728844adbf49eb090e4ece0e"
}

Error response

Cannot retrieve file and file size from an invalid download link (only applicable when downloadfrom header is sent)

HTTP status code: 400

{
"err": "Cannot get file name and file size from url."
}

Redirect link is not supported (only applicable when downloadfrom header is sent)

HTTP status code: 400

{
"err": "Redirect link not supported."
}

Invalid download link (only applicable when downloadfrom header is sent)

HTTP status code: 400

{
"err": "Invalid download url."
}

Invalid protocol in download link (only applicable when downloadfrom header is sent)

HTTP status code: 400

{
"err": "Download url must start with http:// or https://."
}

File size is larger than permitted maximum size

HTTP status code: 500

{
"err": "Failed to request scan. File size exceeded the maximum size permitted by your configuration."
}