Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i cant run upload form uploader.flow #345

Open
Nemra1 opened this issue Jun 10, 2018 · 0 comments
Open

i cant run upload form uploader.flow #345

Nemra1 opened this issue Jun 10, 2018 · 0 comments

Comments

@Nemra1
Copy link

Nemra1 commented Jun 10, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant