Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# signNow API Java SDK
## v3.2.0
## v3.2.1

[![Java Version](https://img.shields.io/badge/codebase-java--11-yellowgreen)](https://www.java.com/)

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.signnow</groupId>
<artifactId>signnow-java-sdk</artifactId>
<version>3.1.0</version>
<version>3.2.1</version>
<packaging>jar</packaging>
<name>signnow-java-sdk</name>
<description>SignNow official Java SDK</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
package com.signnow.api.document.response.data.fieldinvite;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.signnow.core.data.ApiData;
import java.util.LinkedHashMap;
Expand All @@ -20,6 +21,7 @@
/**
* This class represents a FieldInvite which is a part of the signNow SDK API client.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public final class FieldInvite extends ApiData {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
public class ConfigRepository {

private static final int READ_TIMEOUT = 15;
private static final String CLIENT_NAME = "SignNowApiClient/v3.2.0 (Java)";
private static final String CLIENT_NAME = "SignNowApiClient/v3.2.1 (Java)";
private static final String DEFAULT_DOWNLOADS_DIR = "./src/main/resources/downloads";

private final Map<String, String> configMap;
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/signnow/core/response/FileDownloader.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ public static File saveFile(ResponseData downloadData) throws IOException {
? downloadDirectory + fileName
: downloadDirectory + "/" + fileName;

File directory = new File(downloadDirectory);
if (!directory.exists()) {
if (!directory.mkdirs()) {
throw new IOException("Failed to create directory: " + downloadDirectory);
}
}

try (FileOutputStream fos = new FileOutputStream(filePath)) {
byte[] fileContent = downloadData.getContent();
fos.write(fileContent);
Expand Down