How do I call a text file from google drive

0 favourites
  • 6 posts
From the Asset Store
OpenAI TTS
$10 USD
Text-to-Speech plugin.Allows your Construct 3 project to convert written text into spoken words
  • Hello to everyone , I have an app that give predictions for football games on google play store but google inform me that i have to unpublish it because my app request a webpage. note that this app made with adobe flash pro.

    So now i have to use construct 2 to call a text file from google drive but i dont know how.

    I trying the past 2 days using ajax but i didnt get it?

    Any ideas?

  • Hello to everyone , I have an app that give predictions for football games on google play store but google inform me that i have to unpublish it because my app request a webpage. note that this app made with adobe flash pro.

    So now i have to use construct 2 to call a text file from google drive but i dont know how.

    I trying the past 2 days using ajax but i didnt get it?

    Any ideas?

    You want ONLY the text, right? So, you need to upload at your server or something and then when you copy the URL/link, you must make sure that the extension(.txt) is there or it will request a webpage instead of the text.

    EXAMPLE

    HIGHER QUALITY EXAMPLE IMAGE

    https://image.ibb.co/gbncpH/THE_25.png

    UPDATE: Umm... I don't think you request the text file from Google Drive. Try to search for hoster service or just get a free hosting service like https://www.5gbfree.com/ or something.

  • I tried it already but didnt work.

    The pathfind is username.5gbfree.com/text.txt

    Also i try with 000webhosting but the same result.

    I read the manual and i notice

    If you want AJAX requests to your server to work from any domain, or in preview, you can configure it to send the following HTTP header:

    Access-Control-Allow-Origin: *

    How can i configure that?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I tried it already but didnt work.

    The pathfind is username.5gbfree.com/text.txt

    Also i try with 000webhosting but the same result.

    I read the manual and i notice

    If you want AJAX requests to your server to work from any domain, or in preview, you can configure it to send the following HTTP header:

    Access-Control-Allow-Origin: *

    How can i configure that?

    Oh, yeah. I forgot to tell you. It will not work on PC. It work on mobile though. Try it. And I don't know how to configure the Access-Control-Allow-Origin

  • HTTP headers are configured on the server side, where the file is hosted - in your case, Google Drive.

    The control is specifically there to prevent outside websites or apps (your game) from directly accessing files on the server. It is pretty much on by default for all servers, because the owners of those servers don't want people abusing their resources.

    If you are the owner/admin of your own server, you can set that HTTP header to allow cross domain access in your server configuration.

    Basically, if you want your app to access data online, a free file hosting service probably isn't going to cut it. You might want to look into setting up your own server, or use a service like backendless, firebase, or parse.

  • Well , i add this line

    <?php

    header('Access-Control-Allow-Origin: *');

    ?>

    to 5gbfree and 000webhosting index.html but still the same.

    When i try the backendless it seems to work.

    Thank you oosyrag for another answer!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)