on 2022 Mar 24 6:42 AM
Is it possible with a Stored Procedure to upload a file?
curl -X 'POST' \\ 'https://dev.somesite/api-external/stock/import-file' \\
-H 'accept: application/json' \\
-H 'authorization: Basic dHN....==' \\
-H 'Content-Type: multipart/form-data' \\
-F 'File=@myfile.csv;type=application/vnd.ms-excel'
ALTER PROCEDURE "DBA"."sp_tsd_catalogus_toc"(IN "file" NTEXT)
result( "Attribute" long NVARCHAR,"Values" long NVARCHAR, instance INTEGER )
url 'https://dev.somesite.com/api-external/stock/import-file'
type 'HTTP:POST'
header 'accept:application/json\\nauthorization: Basic dHNk...==\\ncontent-Type:multipart/form-data'
With this I got a 400 error. I think because the in parameter 'file' contains the content of the file. Is it possible to save a file at the serverside and post that filename in de SP?
Anybody an idea?
Tia Hans
Request clarification before answering.
I asked the API developer to modify there API to accept the content of the file, instead of a file upload. So the problem is 'solved', I can upload my data with SA17 now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 14 | |
| 8 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.