45.7 APPEND_TO_MULTIPART Procedure Signature 1

Use this procedure to add a BLOB to a multipart/form request body.

Syntax

APEX_WEB_SERVICE.APPEND_TO_MULTIPART (
    p_multipart     IN OUT NOCOPY t_multipart_parts,
    p_name          IN            VARCHAR2,
    p_filename      IN            VARCHAR2 DEFAULT NULL,
    p_content_type  IN            VARCHAR2 DEFAULT 'application/octet-stream',
    p_body_blob     IN            BLOB );

Parameters

Table 45-1 APPEND_TO_MULTIPART Parameters

Parameter Description

p_multipart

The table type for the multipart/request body, t_multipart_parts.

p_name

The name of the multipart data.

p_filename

The filename of the multipart data if it exists.

p_content_type

The content type of the multipart data.

p_body_blob

The content to add in BLOB.

Example

DECLARE
    l_multipart    apex_web_service.t_multipart_parts;
BEGIN
    apex_web_service.append (
        p_multipart    => l_multipart,
        p_name         => 'param1',
        p_content_type => 'application/octet-stream',
        p_body_body    => (select blob from table where id = 1) );
END;