We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently, base64 type of crypto bot image is stored on IPFS. Need to convert it to blob type of jpge/png for easier access.
Here are a few helpful links and methods for resolving the issue.
function base64toBlob(base64Data, contentType) { contentType = contentType || ''; var sliceSize = 1024; var byteCharacters = atob(base64Data); var bytesLength = byteCharacters.length; var slicesCount = Math.ceil(bytesLength / sliceSize); var byteArrays = new Array(slicesCount); for (var sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex) { var begin = sliceIndex * sliceSize; var end = Math.min(begin + sliceSize, bytesLength); var bytes = new Array(end - begin); for (var offset = begin, i = 0; offset < end; ++i, ++offset) { bytes[i] = byteCharacters[offset].charCodeAt(0); } byteArrays[sliceIndex] = new Uint8Array(bytes); } return new Blob(byteArrays, { type: contentType }); }
https://stackoverflow.com/questions/45817204/how-to-convert-base64-string-into-file-object-in-javascript-which-should-work-in
https://stackoverflow.com/questions/35940290/how-to-convert-base64-string-to-javascript-file-object-like-as-from-file-input-f
The text was updated successfully, but these errors were encountered:
manangouhari
Successfully merging a pull request may close this issue.
Currently, base64 type of crypto bot image is stored on IPFS. Need to convert it to blob type of jpge/png for easier access.
Here are a few helpful links and methods for resolving the issue.
https://stackoverflow.com/questions/45817204/how-to-convert-base64-string-into-file-object-in-javascript-which-should-work-in
https://stackoverflow.com/questions/35940290/how-to-convert-base64-string-to-javascript-file-object-like-as-from-file-input-f
The text was updated successfully, but these errors were encountered: