Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function converteFoto(evt){
- console.log(evt.target.result)
- var obj = {
- "_id": $routeParams.id,
- "foto": evt.target.result
- }
- CadastraFoto.fotoPerfil(obj).success(function(response){
- }).error(function(response, status){
- })
- }
- $scope.cadastraFoto = function(){
- var input = document.getElementById('fotoPerfil').files[0]
- var reader = new FileReader()
- reader.readAsDataURL(input)
- reader.onload = converteFoto
- }
Add Comment
Please, Sign In to add comment