Add missing header
This commit is contained in:
parent
ace8cf6189
commit
3b40f31cd0
|
@ -129,7 +129,9 @@ public class ZenodoDeposit implements RepositoryDeposit {
|
|||
// Second step, add the file to the entry.
|
||||
FileEnvelope pdfEnvelope = dmpDepositModel.getPdfFile();
|
||||
FileSystemResource fileSystemResource = new FileSystemResource(pdfEnvelope.getFile());
|
||||
HttpEntity<FileSystemResource> addFileMapRequest = new HttpEntity<>(fileSystemResource, null);
|
||||
HttpHeaders fileHeaders = new HttpHeaders();
|
||||
fileHeaders.setContentType(MediaType.APPLICATION_OCTET_STREAM);
|
||||
HttpEntity<FileSystemResource> addFileMapRequest = new HttpEntity<>(fileSystemResource, fileHeaders);
|
||||
|
||||
String addFileUrl = links.get("bucket") + "/" + pdfEnvelope.getFilename() + "?access_token=" + zenodoToken;
|
||||
restTemplate.put(addFileUrl, addFileMapRequest);
|
||||
|
|
Loading…
Reference in New Issue