Skip to content

Commit 8a41515

Browse files
authored
Merge pull request #21 from lepidus/addDataBinaryArgument#19
Adds "--data-binary @-" argument into the curl command to publish a Dataverse Collection or a Dataset
2 parents 08ff740 + 7bba29e commit 8a41515

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

swordappclient.php

+4
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ function completeIncompleteDeposit($sac_url, $sac_u, $sac_p, $sac_obo) {
163163
array_push($headers, "Content-Length: 0");
164164
array_push($headers, "In-Progress: false");
165165

166+
curl_setopt($sac_curl, CURLOPT_POSTFIELDS, array(
167+
'file' => '@' .realpath('-')
168+
));
169+
166170
curl_setopt($sac_curl, CURLOPT_HTTPHEADER, $headers);
167171

168172
$sac_resp = curl_exec($sac_curl);

0 commit comments

Comments
 (0)