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
11 changes: 9 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# Changelog

## v1.3.2
## v1.3.3
-Fix:
- Constructor in Java class files now include missing headers
### Mar 26, 2024
### Apr 09, 2024

## v1.3.2

### March 28, 2024

- Fix:
- fixed null content type issue

## v1.3.1

Expand Down
6 changes: 5 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,11 @@
<version>1.1.1</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>


Expand Down
8 changes: 6 additions & 2 deletions src/main/java/com/contentstack/cms/stack/FileUploader.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Objects;

import javax.activation.MimetypesFileTypeMap;

public class FileUploader {


Expand Down Expand Up @@ -49,7 +51,9 @@ private void addFormDataPartIfNotNull(MultipartBody.Builder builder, String name
// Helper method to get content type of file
private String getContentType(File file) {
try {
return Files.probeContentType(file.toPath());
java.nio.file.Path source = Paths.get(file.toString());
MimetypesFileTypeMap m = new MimetypesFileTypeMap(source.toString());
return m.getContentType(file);
} catch (IOException e) {
throw new RuntimeException("Failed to determine content type of file", e);
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/contentstack/cms/stack/Merge.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* @author ishaileshmishra
* @version v1.0.0
* @see <a href=
* "https://stag-www.contentstack.com/docs/developers/apis/content-management-api/#merge-branches">Merge
* "https://www.contentstack.com/docs/developers/apis/content-management-api/#merge-branches">Merge
* Branches </a>
* @since 2023 -June-30
*/
Expand Down Expand Up @@ -128,7 +128,7 @@ public Call<ResponseBody> branch(@NotNull String compareBranch, JSONObject reque
*
* @return the call
* @see <a href=
* "https://stag-www.contentstack.com/docs/developers/apis/content-management-api/#get-all-merge-jobs"></a>Get
* "https://www.contentstack.com/docs/developers/apis/content-management-api/#get-all-merge-jobs"></a>Get
* all
* Merge Jobs
*/
Expand All @@ -144,7 +144,7 @@ public Call<ResponseBody> find() {
* @param mergeJobUid the key of the header to be added
* @return the call
* @see <a href=
* "https://stag-www.contentstack.com/docs/developers/apis/content-management-api/#get-single-merge-job"></a>Get
* "https://www.contentstack.com/docs/developers/apis/content-management-api/#get-single-merge-job"></a>Get
* a
* Single Merge Job
*/
Expand Down