stranger82 / angular-utf8-base64 Goto Github PK
View Code? Open in Web Editor NEWAngularJS service for UTF-8 and Base64 Javascript Encoding
License: MIT License
AngularJS service for UTF-8 and Base64 Javascript Encoding
License: MIT License
The following encoded string will fail with the error "The string to be decoded is not the correct length for a base64 encoded string."
eyJzdWIiOiJqMTIzNDU2NzhAYWEuY29tIiwicm9sZSI6IkFETUlOSVNUUkFUT1IiLCJpZGxlIjoiMTIwIiwiaXNzIjoiaHR0cHM6Ly9leGFtcGxlcy5jb20iLCJhdWQiOiJodHRwczovL2V4YW1wbGVzLmNvbSIsImV4cCI6MTQ1MjIwOTE0MywibmJmIjoxNDUyMjA5MDIzfQ
However, the above encoded string is a valid base64 encoded string. I have verified that it correctly decodes with the following online base64 decoders:
Hi,
is there a typescript definition for this library? Is it possible to use the definition of jquery.base64 that you can find in github/DefinitelyTyped instead?
Hi,
I would like to know when you will publish your next release with urlEncode & urlDecode ?
Thank you for your job,
Jaufré
The module name is actually "utf8-base64" instead of "ab-base64" as indicated in the usage notes. ;)
I get this in chrome inspector.
angular.js:14199 Error: [$injector:unpr] Unknown provider: $base64Provider <- $base64 <- ReportsCtrl
Does this code still work? I notice that the CodePen for the "Really fast Javascript Base64 encoder/decoder with utf-8 support." is gone
First off, i'm pretty new to angular - js - ,...
My files are stored in our legacy ERP system as BLOB (UTF-8)
I pull them from the database with a c# webservice and encode them to base64.
Next step is to decode them back in my app.
It's working perfect for pdf, images, csv,....
However xls (and xlsx) files are not working on ipad. (haven't tried with other office files yet)
I decoded them back to binary in my webservice, wrote the data back to disk. At this point the file is still working.
When I compare the binary data with the binary data in my app, they are not the same.
I'm not an expert on bin data, but either iOS (9) or the decoder are messing up the data.
There are some use cases where I may want to use base64
during the config phase of my app. Can you define it as a constant so it is not constrained to run
?
Currently the .bower.json returns an array of files like so:
"main": [
"angular-utf8-base64.js",
"angular-utf8-base64.min.js"
],
If one runs "bower install", both files are included into the build.
This is my grunt task that injects two files from the above array:
// Automatically inject Bower components into the app
'bower-install': {
app: {
html: '<%= yeoman.app %>/index.html',
ignorePath: '<%= yeoman.app %>/'
}
},
Thank you for providing such an useful module.
Only on question left, what does the "ab" in "ab-base64" means?
Good day!
What a different with native function?
I hava a string with base64 data and try to decode it and create blob object:
var blob = new Blob([ atob(attchment_data) ], {type: "image/jpg"});
var blob22 = new Blob([ base64.decode(attchment_data)], {type: "image/jpg"});
But:
blob.size = 124375
blob22.size = 80221
Posible I don't understand right way to decoding base64 string... but I don't create file from base64 data if it's not text file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.