File uploading not working


#1

Hello, I’m having issues uploading files. I’m using the emulator ‘BlueStacks’ (I don’t have a phone currently).

   $ionicPlatform.ready(function() {
        $scope.uploading = true;

        alert(FileUploadOptions);
        var options = new FileUploadOptions();
        options.params = {caption: $scope.caption, original_meme: $scope.original_meme, 'session-id': window.localStorage['session-id'], 'caption-color': $scope.colors.caption};
        options.chunkedMode = false;

        var ft = new FileTransfer();
        ft.upload($scope.image, encodeURI('http://192.168.0.7:3000/add'), options,
        function(result) {
            $scope.image = 'img/default.png';
            $scope.caption.caption = '';
            $scope.colors.caption = 'black';
            alert('Successfully created meme');
            $scope.uploading = false;
        }, function(err) {
            $scope.uploading = false;
            alert('An error has occured.');
        }, options, true);
    });

The code alerts the FileUploadOptions perfectly fine, but my server side doesn’t even detect
any requests at all. I made usre the server-side code was alright.