parent
591ed6fcd9
commit
0548d0b352
|
@ -129,7 +129,9 @@ public class ZenodoDeposit implements RepositoryDeposit {
|
||||||
// Second step, add the file to the entry.
|
// Second step, add the file to the entry.
|
||||||
FileEnvelope pdfEnvelope = dmpDepositModel.getPdfFile();
|
FileEnvelope pdfEnvelope = dmpDepositModel.getPdfFile();
|
||||||
FileSystemResource fileSystemResource = new FileSystemResource(pdfEnvelope.getFile());
|
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;
|
String addFileUrl = links.get("bucket") + "/" + pdfEnvelope.getFilename() + "?access_token=" + zenodoToken;
|
||||||
restTemplate.put(addFileUrl, addFileMapRequest);
|
restTemplate.put(addFileUrl, addFileMapRequest);
|
||||||
|
|
Loading…
Reference in New Issue