#1
  1. A Change of Season
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    3,246
    Rep Power
    220

    .fileupload doesn't work on aws but works on local machine


    Hey;

    Hey I use Jquery uploader to upload file and respond back with json.

    When I upload the file, on the local machine, it works fine and I see what upload/image prints.

    However, when I deploy the same code online to aws and try it live, I only get "start: function ()" part working and looks like controller "upload", method "image" just does nothing.

    I still get status 200 however I don't see any of the stuff I print in that controller!

    How can I debug this?

    Even when I comment everything in the controller I call via ajax, still it doesn't print anything online!

    Thanks.


    PHP Code:
    public function image() {
           
            echo 
    "It's here";

        } 
    Code:
    $('#background_image_front').fileupload(
                {
                    dropZone: $("#cover_photo_drop"),
                    url: '/upload/image',
                    paramName: 'file',
                    dataType: 'json',
                    formData: {
                        type: 'sharetape'
                },
            start: function () { alert('Started');
                $('#cover_photo_progress').show();
                $('#cover_photo_progress').children('.progress-bar').css('width', 0);
                $('#cover_photo_message').hide();
            },
            done: function (e, data) { alert('Done 1');
            DO A BUNCH OF STUFF
            },
            progressall: function (e, data) {
                var progress = parseInt(data.loaded / data.total * 100, 10);
                $('#cover_photo_progress').show().children('.progress-bar').css('width', progress + '%');
            }
        }).prop('disabled', !$.support.fileInput)
            .parent().addClass($.support.fileInput ? undefined : 'disabled');
    Last edited by English Breakfast Tea; October 18th, 2017 at 01:16 AM.
  2. #2
  3. A Change of Season
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    3,246
    Rep Power
    220
    Anyone?
  4. #3
  5. A Change of Season
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    3,246
    Rep Power
    220
    I even made a new function in the controller, and that doesn't print anything in the network tab either.

    What could the issue be?
  6. #4
  7. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Caro, Michigan
    Posts
    14,814
    Rep Power
    4536
    I'd start with a very basic PHP file upload script to sort through any PHP issues. It's usually a permissions issue in these cases.
    -- Cigars, whiskey and wild, wild women. --

IMN logo majestic logo threadwatch logo seochat tools logo