ninjatronic / angular-base64 Goto Github PK
View Code? Open in Web Editor NEWBase64 conversion for AngularJS
License: Other
Base64 conversion for AngularJS
License: Other
Is it possible to inject $base64? How to user this library with injector?
I added base64 as dependency to module, but karma tests fail
angular.module('app', ['base64'])
Am i missing something? should we add dependency anywhere else?
iOS native smileys not working with encode/decode function.
I am working on chat application with Ionic Framework, encryption / description works fine with text & symbols but fails with smileys.
sample text:
"Hey there, this is sample text with smileys 😣😣😣😌"
Thanks
Is it possible to rename this to ng-base64? Somehow Bower is using a lower case version of the library when it's used indirectly. I have an app using angular-kinvey, which uses this and it returns a NO_BOWER_JSON error showing that it's expecting ngbase64 rather than ngBase64. It's not a problem for me as I use a Mac with case insensitive HFS but a colleague of mine encountered this problem because he's on a linux box. Or is there a solution to this problem? Thanks.
When an application is using "Base64 URL Safe" to encode a string, angular-base64's decode will fail.
For example:
Just as a comparison, if you use window.atob(base64here), it'll work just fine;
How can i use this in html input tag to upload an image
the 'this' ref in the lib kept being undefined for some reason. i couldn't figure out why but i noticed that there was nothing special about using 'this' in the lib anyway.
I have fixed the problem by using factory instead of constant and removing all uses of 'this'.
the API has not changed.
would you be interested in a PR?
Getting the error Cannot decode base64
. Any possible reasons?
Hi,
when I chose a file from an input tag of html, I have acces to an array of File object. Every File object has tihs elements:
{ lastModified: 42342342 lastModifiedDate: Date ... name: "272.jpg" size: 46675 type: "image/jpeg" }
How can I access to the file and do a $base64.encode(file)
of it's data?
My code is simple:
$base64.encode($scope.loginText)
Now if I put ö as loginText
then I get 9g==
that is invalid. As a reference, and valid, encoding I use java:
import java.util.Base64;
//...
byte[] encode = Base64.getEncoder().encode("ö".getBytes());
System.out.println(new String(encode));
produces 'w7Y=
and python
>>> import base64
>>> base64.b64encode("ö")
'w7Y=
Similar issue for other chars from german language, some from spanish and polish.
Can't install with npm due to invalid package.json
I'm using the below code to retrieve the data.I'm getting an 401 unauthorized error.
var url = 'https://xxx.yyy.zzz-gtgl.com/obdo/newsfeedinteg';
var auth = $base64.encode("newsfeed:newsfeed@123"),
headers = {"Authorization": "Basic " + auth};
$http.get(url, {headers: headers}).success(function (resp) {
console.log(resp);
}).error(function (err) {
console.log(err);
});
When i was checking in postman it's working fine and get the json response.
In postman I'm enter the username and password in Basic Auth field which comes under Authorization and content-type as application/json finally send the POST request.
Please assist me.
hello, recently we want to add your lib on https://cdnjs.com, but we need a clear license field. by follow urls, we guess the type of the license you use is BSD:
https://github.com/ninjatronic/angular-base64/blob/master/LICENSE
https://github.com/client9/stringencoders/blob/master/COPYING
we need to confirm this thing with you, if there is any mistake, please tell me.
thank you very much!
Since version 2.0.3, you've fixed the bower.json
file so it doesn't specify both the raw and minified versions of the package. Can you tag a 2.0.4 release?
It would be valuable to integrate with Saucelabs in order totest cross-browser compatibility on commit.
A good start would be to adopt karma as testing framework my suggestion is to start implemeting the various unit tests using karma-sauce-launcher.
This way it will be possiblle to automatically execute all the unit test on the selection of browsers targetted by the library (all) and know proactively where it is not working.
e.g.: https://github.com/globaleaks/GlobaLeaks
It would be also nice to start tracking the code quality of the project using for example CodeClimate and integrate it with karma-coverage in order to track also the code coverage.
Hello, I use your lib to encode IP address and pass it to RoR.
Problem is, when I run Ruby's Base64.decode64 on it, I get this
��e�+-z
Encoded string is MTcyLjE4LjAuMTQw
Raw string is 172.18.0.140
Any idea what is wrong?
Thanks
Few point of the libraries seems to use wrong javascripts comparisons: https://codeclimate.com/github/ninjatronic/angular-base64/angular-base64.js#bugrisk
This on certain conditions may affect browser compatibilities.
You have a version tagged 2.0.2, but in bower.json it's still 2.0.1, which is confusing.
Could you please change the version in bower.json and move the 2.0.2 tag, or make a new version?
Thanks!
I am getting images from API. So what i need is to convert those image urls to base64 and save it in sqlite table. and then display them offline from local sqlite db where images saved as base64.
how to use in ionic 2 for Typescript
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.