Update base64 requirement from 0.13.0 to 0.21.5 (#10336)
# Objective - Update base64 requirement from 0.13.0 to 0.21.5. - Closes #10317. ## Solution - Bumped `base64` requirement and manually migrated code to fix a breaking change after updating.
This commit is contained in:
parent
dc8fc6cb34
commit
3b59dbd772
@ -47,7 +47,7 @@ gltf = { version = "1.3.0", default-features = false, features = [
|
|||||||
"utils",
|
"utils",
|
||||||
] }
|
] }
|
||||||
thiserror = "1.0"
|
thiserror = "1.0"
|
||||||
base64 = "0.13.0"
|
base64 = "0.21.5"
|
||||||
percent-encoding = "2.1"
|
percent-encoding = "2.1"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
|
|||||||
@ -1448,7 +1448,7 @@ impl<'a> DataUri<'a> {
|
|||||||
|
|
||||||
fn decode(&self) -> Result<Vec<u8>, base64::DecodeError> {
|
fn decode(&self) -> Result<Vec<u8>, base64::DecodeError> {
|
||||||
if self.base64 {
|
if self.base64 {
|
||||||
base64::decode(self.data)
|
base64::Engine::decode(&base64::engine::general_purpose::STANDARD_NO_PAD, self.data)
|
||||||
} else {
|
} else {
|
||||||
Ok(self.data.as_bytes().to_owned())
|
Ok(self.data.as_bytes().to_owned())
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user