Importing text data

Discussion and feedback on Construct 2

Post » Tue Apr 03, 2012 4:07 am

B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Tue Apr 03, 2012 10:30 am

@rexrainbow
How can I import an online hosted csv file from my app installed on my iphone (locally) ?
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Tue Apr 03, 2012 10:38 am

@septeven

Uh, I guess, in C2, you can use AJAX to get (csv) strings then process it (load into csv plugin).

I might not catch your problem correctly.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Tue Apr 03, 2012 10:51 am

@rexrainbow
Yes but if the csv file is hosted e.g on my website, and the app is installed on my iphone, there will be a problem cause cross-domain security.
I've read about the "Access-Control-Allow-Origin: *" but I didn't be able to figure it out...
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Tue Apr 03, 2012 10:59 am

@septeven

Sorry, I have no idea about "cross-domain security". You might ask to @Pode.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Tue Apr 03, 2012 11:03 am

@septeven : do you have a easy way to activate CORS on your webserver ?
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Tue Apr 03, 2012 1:06 pm

@Pode
I don't think so.
In fact, It's not specially about csv, but I need to load and write in a txt file (or other text format) from a local app (iphone) to a file hosted online (on a ftp, or dropbox, or others).
Any ideas ?
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Tue Apr 03, 2012 9:55 pm

@septeven : you can use XHR2 instead of XHR only. I know that XMLHttpRequest Level 2 allows for cross domain exchange. However, I suppose that the Ajax calls made by C2 are XHR1 only. Either ask @Ashley, or you need to create a small plugin .
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Wed Apr 04, 2012 1:10 pm

@Pode
I'll see this.
Besides, I figured it out with AJAX and PHP.
Thx
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests