Skip to content

i cant run upload form uploader.flow #345

Description

@Nemra1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions