-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upload additional files (media) to the asset and solved inconsistency…
… asset vs. file name (#99) * Upload of additional files to media * Fixed issue and inconsistency with file / asset name, implementation of upload additional file. Updated sample program and tests. * Removed upload sample Co-authored-by: Alfredo Navarro <alfredo.navarro@redbull.com>
- Loading branch information
Showing
9 changed files
with
189 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/main/java/com/bynder/sdk/model/upload/UploadAdditionalMediaResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (c) 2017 Bynder B.V. All rights reserved. | ||
* | ||
* Licensed under the MIT License. See LICENSE file in the project root for full license | ||
* information. | ||
*/ | ||
package com.bynder.sdk.model.upload; | ||
|
||
import com.bynder.sdk.api.BynderApi; | ||
import com.google.gson.annotations.SerializedName; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
/** | ||
* Model returned by {@link BynderApi#saveMedia(Map)}. | ||
*/ | ||
public class UploadAdditionalMediaResponse { | ||
|
||
/** | ||
* Media id. | ||
*/ | ||
@SerializedName(value = "itemId") | ||
private String itemId; | ||
|
||
public String getItemId() { | ||
return itemId; | ||
} | ||
} |
67 changes: 67 additions & 0 deletions
67
src/main/java/com/bynder/sdk/query/upload/FinaliseUploadAdditionalQuery.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Copyright (c) 2017 Bynder B.V. All rights reserved. | ||
* | ||
* Licensed under the MIT License. See LICENSE file in the project root for full license | ||
* information. | ||
*/ | ||
package com.bynder.sdk.query.upload; | ||
|
||
import com.bynder.sdk.query.decoder.ApiField; | ||
|
||
/** | ||
* Query with the information to finalise a completely uploaded file. | ||
*/ | ||
public class FinaliseUploadAdditionalQuery { | ||
|
||
/** | ||
* Upload id for the file being uploaded. | ||
*/ | ||
@ApiField(name = "uploadId") | ||
private final String uploadId; | ||
|
||
/** | ||
* Target id in the authorisation information. | ||
*/ | ||
@ApiField(name = "targetid") | ||
private final String targetId; | ||
|
||
/** | ||
* Base location of the uploaded file. | ||
*/ | ||
@ApiField(name = "s3_filename") | ||
private final String s3Filename; | ||
|
||
/** | ||
* Total number of chunks uploaded. | ||
*/ | ||
@ApiField | ||
private final Long chunks; | ||
|
||
public FinaliseUploadAdditionalQuery( | ||
final String uploadId, | ||
final String targetId, | ||
final String s3Filename, | ||
final Long chunks | ||
) { | ||
this.uploadId = uploadId; | ||
this.targetId = targetId; | ||
this.s3Filename = s3Filename; | ||
this.chunks = chunks; | ||
} | ||
|
||
public String getUploadId() { | ||
return uploadId; | ||
} | ||
|
||
public String getTargetId() { | ||
return targetId; | ||
} | ||
|
||
public String getS3Filename() { | ||
return s3Filename; | ||
} | ||
|
||
public Long getChunks() { | ||
return chunks; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters