Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Client to Server Meta Data do not work #17

Closed
tanasebutcaru opened this issue Aug 5, 2014 · 1 comment
Closed

[FIX] Client to Server Meta Data do not work #17

tanasebutcaru opened this issue Aug 5, 2014 · 1 comment

Comments

@tanasebutcaru
Copy link

Hi,

I'm trying to send same metadata from client to server and I get the following error.

TypeError: event.file.meta is undefined
event.file.meta.hello = "world";

My client-side code:

uploader.addEventListener("start", function(event){
    event.file.meta.hello = "world";
});

Everything else works just fine, beside this one.
If I set clientDetail from server to client, it works.

I have also tried defining the meta data like this:

event.file = {
            'meta' : {
                'hello': world,
            }
        };
--- or ---
event.file.meta = {
      'hello' : world;
};

...but on server side I get "undefined" when trying to access these values with event.file.meta.hello

FIX

It seems that npm install --save socketio-file-upload does not install the latest github version and all js files are smaller in size than the original github ones.
So, unless the node package is not up-to-date, it would be better to manually copy files from github repo...

@tanasebutcaru tanasebutcaru changed the title Client to Server Meta Data do not work Client to Server Meta Data does not work Aug 5, 2014
@tanasebutcaru tanasebutcaru changed the title Client to Server Meta Data does not work Client to Server Meta Data do not work Aug 5, 2014
@tanasebutcaru tanasebutcaru changed the title Client to Server Meta Data do not work [FIX] Client to Server Meta Data do not work Aug 5, 2014
@vote539
Copy link
Collaborator

vote539 commented Dec 18, 2014

Yes, sorry about not updating npm sooner. The latest code from Github is now on npm.

@vote539 vote539 closed this as completed Dec 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants