1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    15
    Vote Rating
    1
    rhonnel francisco is on a distinguished road

      0  

    Default Unanswered: Uploading image to a remote server

    Unanswered: Uploading image to a remote server


    Hi guys, i dont understand why this sample project fails when i ran it into a device or simulator. I'm using cordova 1.8.0 and my device is iPhone 4S

    See this example: http://mindsaur.com/demo/fileupload/

    Source: https://github.com/kostysh/File-uplo...r-Sencha-Touch

    That example works perfectly in the browser but when i install it on the device everytime i capture or select a photo the screen becomes black and the app is not responding anymore, any idea??

    I badly need this kind of function on my app.

  2. #2
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Answers
    148
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    Could you please post me only the code where you ask PhoneGap to take a picture?
    I'm pretty sure you are facing a performance issue because you are asking to get a High quality picture in a base64 format instead of using the FILE_URI destination type.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


  3. #3
    Sencha User
    Join Date
    Sep 2013
    Posts
    5
    Vote Rating
    0
    ram.pekam is on a distinguished road

      0  

    Default Image Upload using Base64

    Image Upload using Base64


    I am trying to upload image to JAVAServer, Following are the details :

    I am using server : JAVA Spring with REST Services and Extjs 4.

    I need to upload image using base64 to Server.

    1. What are the best practices for uploading image to server ?

    2. How to convert image to base64 string in extjs4 ?

    3. How to submit form along with form data ?

    With this I am able to hit server but every parameter is null i.e. no data is being transferred
    var form = Ext.getCmp('member_form').getForm();


    if (form.isValid()) // Validation
    {
    // communicating with server for registering member info
    form.submit({
    url : '/my/Test',
    // standardSubmit: true,
    method : 'POST',
    waitMsg : 'Registring...',
    success : function(form, o) {
    console.log(form);
    msg('Success', 'Processed file "'
    + o.result.file
    + '" on the server');
    },
    failure : function() {
    alert('Registration failed...');
    }
    });
    }

    Please help me I am stucked at this point.

  4. #4
    Sencha User
    Join Date
    May 2011
    Location
    Melbourne, Australia
    Posts
    89
    Answers
    5
    Vote Rating
    7
    Greg Arnott is on a distinguished road

      0  

    Default


    Code:
     
    initialize: function() {
            this.callParent();
    
    
            var me     = this,
                fileup = Ext.create('Ext.ux.Fileup', {
                    itemId        : 'fileLoadBtn',
                    xtype         : 'fileupload',
                    autoUpload    : true,
                    loadAsDataUrl : true,
                    cls           : 'icon-cameraroll',
                    states: {
                        browse: {
                            text: 'Browse and load'
                        },
                        ready: {
                            text: 'Load'
                        },
                        uploading: {
                            text: 'Loading',
                            loading: true
                        }
                    }
                });
    
    
            me.insert(2, fileup);
    
    
            fileup.show();
    
    
            fileup.on('loadsuccess', me.onFileLoadSuccess, me);
            fileup.on('loadfailure', me.onFileLoadFailure, me);
        },
    
    
        onFileLoadFailure: function(message) {
            Ext.Viewport.down('#imageUploadMessage').setHtml(message);
        },
    
    
        onFileLoadSuccess: function(dataurl, reader, e) {
            // dataurl = the image in base64 format.
        }

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi