pekebyte/pekeUpload

How to use data option ?

Closed this issue · 7 comments

Sorry just found, thanks var_dump....

please show how to use the data options need badly..
email me if you can jairo.malanay@gmail.com

or please give sample with data options

Hi, no prob
just use Json
just add the option data like this

data:'{"var:valeur"}' (important data content must be a string, that's
where i was wrong)

& then in php file :

if(isset($_POST['data'])){
$json=$_POST['data'];
$data=json_decode($json, true);
Have a nice day.

william
Le 12/08/2013 08:25, jairo a écrit :

please show how to use the data options need badly..
email me if you can jairo.malanay@gmail.com
mailto:jairo.malanay@gmail.com

or please give sample with data options


Reply to this email directly or view it on GitHub
#5 (comment).

thanks for the feedback.

dear sir,

i wish i'm not disturbing too much

but the sending data in peke upload still failed

i have tried this as input
data: '{ site_id : "154" }'
data: '{ "site_id : 154" }'
data: { site_id : 154 }

but still doesnt work

On Mon, Aug 12, 2013 at 11:19 PM, double-v notifications@github.com wrote:

Hi, no prob
just use Json
just add the option data like this

data:'{"var:valeur"}' (important data content must be a string, that's
where i was wrong)

& then in php file :

if(isset($_POST['data'])){
$json=$_POST['data'];
$data=json_decode($json, true);
Have a nice day.

william
Le 12/08/2013 08:25, jairo a écrit :

please show how to use the data options need badly..
email me if you can jairo.malanay@gmail.com
mailto:jairo.malanay@gmail.com

or please give sample with data options


Reply to this email directly or view it on GitHub
#5 (comment).


Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-22500846
.

i think this is where i make my mistake
formData.append('data', options.data);

i can understand this perfectly

On Fri, Aug 23, 2013 at 9:32 AM, jairo malanay jairo.malanay@gmail.comwrote:

dear sir,

i wish i'm not disturbing too much

but the sending data in peke upload still failed

i have tried this as input
data: '{ site_id : "154" }'
data: '{ "site_id : 154" }'
data: { site_id : 154 }

but still doesnt work

On Mon, Aug 12, 2013 at 11:19 PM, double-v notifications@github.comwrote:

Hi, no prob
just use Json
just add the option data like this

data:'{"var:valeur"}' (important data content must be a string, that's
where i was wrong)

& then in php file :

if(isset($_POST['data'])){
$json=$_POST['data'];
$data=json_decode($json, true);
Have a nice day.

william
Le 12/08/2013 08:25, jairo a écrit :

please show how to use the data options need badly..
email me if you can jairo.malanay@gmail.com
mailto:jairo.malanay@gmail.com

or please give sample with data options


Reply to this email directly or view it on GitHub
#5 (comment).


Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-22500846
.

Hi,

It's your json synthax whih isn't good :
http://fr.wikipedia.org/wiki/JavaScript_Object_Notation

just add your several variable in 1 string var.

data: '{ site_id : "154" }'
data: '{ "site_id : 154" }'
data: { site_id : 154 }

become :

data:'{site_id : "154",site_id : "154",site_id : "154"}';

Le 23/08/2013 03:38, jairo a écrit :

i think this is where i make my mistake
formData.append('data', options.data);

i can understand this perfectly

On Fri, Aug 23, 2013 at 9:32 AM, jairo malanay
jairo.malanay@gmail.comwrote:

dear sir,

i wish i'm not disturbing too much

but the sending data in peke upload still failed

i have tried this as input
data: '{ site_id : "154" }'
data: '{ "site_id : 154" }'
data: { site_id : 154 }

but still doesnt work

On Mon, Aug 12, 2013 at 11:19 PM, double-v
notifications@github.comwrote:

Hi, no prob
just use Json
just add the option data like this

data:'{"var:valeur"}' (important data content must be a string, that's
where i was wrong)

& then in php file :

if(isset($_POST['data'])){
$json=$_POST['data'];
$data=json_decode($json, true);
Have a nice day.

william
Le 12/08/2013 08:25, jairo a écrit :

please show how to use the data options need badly..
email me if you can jairo.malanay@gmail.com
mailto:jairo.malanay@gmail.com

or please give sample with data options


Reply to this email directly or view it on GitHub

#5 (comment).


Reply to this email directly or view it on
GitHubhttps://github.com//issues/5#issuecomment-22500846
.


Reply to this email directly or view it on GitHub
#5 (comment).

well.. i manage to do the job, but i modify the library >.<
i change the formData.append('data', option.data)
to
var keys = Object.keys( options.data );
var values = options.data;
for(var i=0; i<Object.keys( options.data ).length; i+=1){
formData.append( keys[i], values[ keys[i] ] );
}

and i works, the data input should be {id: 121}

On Mon, Aug 26, 2013 at 8:49 PM, double-v notifications@github.com wrote:

Hi,

It's your json synthax whih isn't good :
http://fr.wikipedia.org/wiki/JavaScript_Object_Notation

just add your several variable in 1 string var.

data: '{ site_id : "154" }'
data: '{ "site_id : 154" }'
data: { site_id : 154 }

become :

data:'{site_id : "154",site_id : "154",site_id : "154"}';

Le 23/08/2013 03:38, jairo a écrit :

i think this is where i make my mistake
formData.append('data', options.data);

i can understand this perfectly

On Fri, Aug 23, 2013 at 9:32 AM, jairo malanay
jairo.malanay@gmail.comwrote:

dear sir,

i wish i'm not disturbing too much

but the sending data in peke upload still failed

i have tried this as input
data: '{ site_id : "154" }'
data: '{ "site_id : 154" }'
data: { site_id : 154 }

but still doesnt work

On Mon, Aug 12, 2013 at 11:19 PM, double-v
notifications@github.comwrote:

Hi, no prob
just use Json
just add the option data like this

data:'{"var:valeur"}' (important data content must be a string,
that's
where i was wrong)

& then in php file :

if(isset($_POST['data'])){
$json=$_POST['data'];
$data=json_decode($json, true);
Have a nice day.

william
Le 12/08/2013 08:25, jairo a écrit :

please show how to use the data options need badly..
email me if you can jairo.malanay@gmail.com
mailto:jairo.malanay@gmail.com

or please give sample with data options


Reply to this email directly or view it on GitHub

#5 (comment).


Reply to this email directly or view it on
GitHub<
https://github.com/pekebyte/pekeUpload/issues/5#issuecomment-22500846>
.


Reply to this email directly or view it on GitHub
#5 (comment).


Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-23260107
.