flowjs / ng-flow

Flow.js html5 file upload extension on angular.js framework
http://flowjs.github.io/ng-flow/
MIT License
1.38k stars 303 forks source link

i cant run upload form uploader.flow #345

Open Nemra1 opened 6 years ago

Nemra1 commented 6 years ago

controllers.js

$scope.processFiles = function(files) {
    angular.forEach(files, function(flowFile, i) {
        var fileReader = new FileReader();
        fileReader.onload = function(event) {
            var uri = event.target.result;
            var image = uri;
            var r = Math.floor((Math.random() * 225) + 4000);
            reg_photo = site_url + 'assets/sources/uploads/' + oneSignalID + '.jpg';
            var div = angular.element(document.getElementById('photo-upload'));
            div.css('background-image', 'url(' + image + ')');
            $('#photo-upload i').hide();
            con = true;
            $.ajax({
                url: site_url + 'assets/sources/appupload.php',
                data: {
                    action: 'register',
                    base64: image,
                    uid: oneSignalID
                },
                cache: false,
                contentType: "application/x-www-form-urlencoded",
                type: "post",
                success: function() {}
            });
        };
        fileReader.readAsDataURL(flowFile.file);
    });
};

`html form

<div flow-init
       flow-name="uploader.flow"
       flow-files-added="processUserFiles($files)">
    <button flow-btn type="file" id="uploadUserPhoto" style="display: none;">Upload Images</button>
   </div> 

when clicked on camera icon ..must showing the camera app or file manger or gallery to select the image for upload but nothing for now just blank click 2018-06-10_185921

2018-06-10_190035 its never working with me i need to know what i miss in this code

full profile_edit.html

profile_edit.zip