Skip to content

Commit

Permalink
Merge pull request #84 from Charles-Wu-Chen/base64_support_filebox
Browse files Browse the repository at this point in the history
Base64 support filebox related to issue #83
  • Loading branch information
diaozxin007 committed Dec 17, 2020
2 parents 0aea528 + 63f5d8d commit 25a4f07
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ class FileBox(options: FileBoxOptions) {
}

fun toJsonString(): String {
buffer = toByte(this)
buffer = getBufferByte(this)

return JsonUtils.write(this)

}

fun toByte(fileBox: FileBox): ByteArray? {
private fun getBufferByte(fileBox: FileBox): ByteArray? {
when (fileBox.type()) {
FileBoxType.File -> {

Expand All @@ -153,11 +153,12 @@ class FileBox(options: FileBoxOptions) {
return FileUtils.readFileToByteArray(file)

}

FileBoxType.Url -> {
return null;
}

FileBoxType.Base64 -> {
return null;
}
else -> {
TODO()
}
Expand Down

0 comments on commit 25a4f07

Please sign in to comment.