1. #1
    Sencha Premium Member
    Join Date
    Sep 2012
    Location
    Israel
    Posts
    113
    Vote Rating
    1
    sagoig is on a distinguished road

      0  

    Default I'm trying to upload a file..

    I'm trying to upload a file..


    So the setup is as following:
    1. node.js running express 4, and extdirect
    2. extjs 5.0.1
    when asked for directapi:
    PHP Code:
    Ext.ns("ExtRemote");ExtRemote.REMOTING_API={"url":"http://127.0.0.1:3030/direct","namespace":"ExtRemote","type":"remoting","actions":
    {
    "DXArticle":[{"name":"submitarticle","len":1,"formHandler":true},
    {
    "name":"getarticleslist","len":1},{"name":"deletearticle","len":1},
    {
    "name":"updatearticle","len":1}],"DXLogin":[{"name":"authenticate","len":1},
    {
    "name":"deauthenticate","len":1},{"name":"reauthenticate","len":1}]}} 
    all of DXLogin methods work great,
    but now I'm trying to make DXArticle a method called submitarticle,
    it tries to submit the form and what I get is:
    PHP Code:
    POST http://127.0.0.1:3030/direct 500 (Internal Server Error) Connection.js:518
    [EExt.JSON.decode(): You're trying to decode an invalid JSON String: TypeError: Arguments to path.join must be strings   
     at f (path.js:204:15)    
    at Object.filter (native)    
    at Object.exports.join (path.js:209:40)    
    at Object.route.processRoute (D:\wamp\www\wines\node_modules\extdirect\lib\router.js:95:31)    
    at D:\wamp\www\wines\server\config\routes.js:23:16    at Layer.handle 
    [as handle_request] (D:\wamp\www\wines\node_modules\express\lib\router\layer.js:76:5)    
    at next (D:\wamp\www\wines\node_modules\express\lib\router\route.js:100:13)    
    at Route.dispatch (D:\wamp\www\wines\node_modules\express\lib\router\route.js:81:3)    
    at Layer.handle [as handle_request] (D:\wamp\www\wines\node_modules\express\lib\router\layer.js:76:5)   
     at D:\wamp\www\wines\node_modules\express\lib\router\index.js:227:24 
    and the server says the same thing..

    why the hell ?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,330
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The server is throwing the 500 error. You may want to reach out to the author (via GitHub issues maybe) of extdirect module for help with that.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1