Code: Alles auswählen.
lr_request->set_binary_data( iv_data = lf_binary_pdf ).
Code: Alles auswählen.
lr_rest_multi->set_header_field(
EXPORTING
iv_name = if_http_header_fields=>content_type
iv_value = if_rest_media_type=>gc_multipart_form_data
).
lr_rest_multi->set_header_field(
EXPORTING
iv_name = if_http_header_fields=>content_disposition
iv_value = 'form-data; name="File"; filename="test.pdf"'
).
Code: Alles auswählen.
cl_gui_frontend_services=>gui_upload(
EXPORTING
filename = gf_filename
filetype = 'BIN'
IMPORTING
filelength = gf_file_length
CHANGING
data_tab = gt_data_tab ).
DATA(lv_bin_data) = cl_bcs_convert=>solix_to_xstring( it_solix = gt_data_tab ).
Code: Alles auswählen.
lr_request->set_binary_data( iv_data = lf_binary_pdf ).
lr_rest_client->if_rest_client~post( io_entity = lr_rest_multi ).
Code: Alles auswählen.
DATA(lf_transcient_ID) = lr_response->get_string_data( ).
Code: Alles auswählen.
lr_rest_multi->set_header_field(
EXPORTING
iv_name = if_http_header_fields=>content_type
iv_value = if_rest_media_type=>gc_multipart_form_data
).
Code: Alles auswählen.
POST /url HTTP/1.1\r\n
Content-Type: multipart/form-data; boundary=AaB03x\r\n
\r\n
--AaB03x
Content-Disposition: form-data; name="File"; filename="file1.pdf"
Content-Type: application/pdf\r\n
Content-Transfer-Encoding: binary\r\n
\r\n
<Binärdaten aus PDF>
--AaB03x--
Code: Alles auswählen.
curl -X POST -H 'Authorization: Bearer <token>' -H 'Content-Type: multipart/form-data' -F File=@file1.pdf http://adobe.whatever.uri/path