<commit_before>
(function() {
    'use strict';

    angular
        .module('app.bricks', [])
        .service('MemoryService', MemoryService);

    MemoryService.$inject = ["$q"];
    function MemoryService($q) {

        var service = this;

        service.getMemories = getMemories;
        service.saveMemory = saveMemory;

        return service;

        function getMemories() {
            console.log('MemoryService.getMemories');
            return [{
                file: "1.jpg",
                message: "We miss him."
            },
            {
                file: "2.jpg",
                message: "We miss him."
            }]
        }

        function saveMemory(file){
            console.log("Uploading file, ", file);

            var uploadTask = storageRef.child('images/' + file.name).put(file);
            uploadTask.on('state_changed', function(snapshot){
                // Observe state change events such as progress, pause, and resume
                // See below for more detail
            }, function(error) {
                // Handle unsuccessful uploads
                console.log("Upload error, ", error);
            }, function(s) {
                // Handle successful uploads on complete
                // For instance, get the download URL: https://firebasestorage.googleapis.com/...
                var downloadURL = uploadTask.snapshot.downloadURL;
                console.log("Uploadsuccess, ", downloadURL);
            });
        }
    }

})();<commit_msg>move image upload to firebase service<commit_after>
(function() {
    'use strict';

    angular
        .module('app.bricks', [])
        .service('MemoryService', MemoryService);

    MemoryService.$inject = ["$q"];
    function MemoryService($q) {

        var service = this;

        service.getMemories = getMemories;
        service.saveMemory = saveMemory;

        return service;

        function getMemories() {
            console.log('MemoryService.getMemories');
            return [{
                file: "1.jpg",
                message: "We miss him."
            },
            {
                file: "2.jpg",
                message: "We miss him."
            }]
        }

        function saveMemory(message, file){
            
        }
    }

})();
{'fraction_non_alphanumeric': 0.11959842863378438, 'fraction_numerical': 0.001745962461807071, 'mean_word_length': 1.5186813186813186, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5091020', 'n_tokens_mistral': 597, 'n_tokens_neox': 562, 'n_words': 133}