Skip to content

Commit

Permalink
Release 0.0.18
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Oct 6, 2023
1 parent c9f53fc commit 1aea71d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
6 changes: 4 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ java {

test {
useJUnitPlatform()
testLogging {
showStandardStreams = true
}
}

publishing {
publications {
maven(MavenPublication) {
groupId = 'io.squidex'
artifactId = 'squidex'
version = '0.0.17'
version = '0.0.18'
from components.java
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/squidex/api/resources/apps/AppsClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -467,11 +467,11 @@ public AppDto uploadImage(File file, AppsUploadImageRequest request, RequestOpti
.addPathSegment(clientOptions.appName())
.addPathSegments("image")
.build();
MultipartBody.Builder multipartBody = new MultipartBody.Builder().setType(MultipartBody.FORM);
MultipartBody.Builder body = new MultipartBody.Builder().setType(MultipartBody.FORM);
try {
String mimeType = Files.probeContentType(file.toPath());
MediaType mediaType = mimeType != null ? MediaType.parse(mimeType) : null;
multipartBody.addFormDataPart("file", file.getName(), RequestBody.create(mediaType, file));
body.addFormDataPart("file", file.getName(), RequestBody.create(mediaType, file));
} catch (Exception e) {
throw new RuntimeException(e);
}
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/squidex/api/resources/assets/AssetsClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -578,11 +578,11 @@ public AssetDto postAsset(File file, AssetsPostAssetRequest request, RequestOpti
if (request.getDuplicate().isPresent()) {
httpUrl.addQueryParameter("duplicate", request.getDuplicate().get().toString());
}
MultipartBody.Builder multipartBody = new MultipartBody.Builder().setType(MultipartBody.FORM);
MultipartBody.Builder body = new MultipartBody.Builder().setType(MultipartBody.FORM);
try {
String mimeType = Files.probeContentType(file.toPath());
MediaType mediaType = mimeType != null ? MediaType.parse(mimeType) : null;
multipartBody.addFormDataPart("file", file.getName(), RequestBody.create(mediaType, file));
body.addFormDataPart("file", file.getName(), RequestBody.create(mediaType, file));
} catch (Exception e) {
throw new RuntimeException(e);
}
Expand Down Expand Up @@ -713,11 +713,11 @@ public AssetDto postUpsertAsset(
if (request.getDuplicate().isPresent()) {
httpUrl.addQueryParameter("duplicate", request.getDuplicate().get().toString());
}
MultipartBody.Builder multipartBody = new MultipartBody.Builder().setType(MultipartBody.FORM);
MultipartBody.Builder body = new MultipartBody.Builder().setType(MultipartBody.FORM);
try {
String mimeType = Files.probeContentType(file.toPath());
MediaType mediaType = mimeType != null ? MediaType.parse(mimeType) : null;
multipartBody.addFormDataPart("file", file.getName(), RequestBody.create(mediaType, file));
body.addFormDataPart("file", file.getName(), RequestBody.create(mediaType, file));
} catch (Exception e) {
throw new RuntimeException(e);
}
Expand Down Expand Up @@ -887,11 +887,11 @@ public AssetDto putAssetContent(
.addPathSegment(id)
.addPathSegments("content")
.build();
MultipartBody.Builder multipartBody = new MultipartBody.Builder().setType(MultipartBody.FORM);
MultipartBody.Builder body = new MultipartBody.Builder().setType(MultipartBody.FORM);
try {
String mimeType = Files.probeContentType(file.toPath());
MediaType mediaType = mimeType != null ? MediaType.parse(mimeType) : null;
multipartBody.addFormDataPart("file", file.getName(), RequestBody.create(mediaType, file));
body.addFormDataPart("file", file.getName(), RequestBody.create(mediaType, file));
} catch (Exception e) {
throw new RuntimeException(e);
}
Expand Down

0 comments on commit 1aea71d

Please sign in to comment.