0 Favourites

Upload

This forum is currently in read-only mode.
  • In a program I'm making I would need to upload a database(when finished working) to a website and download it again on start up of the program. Download Object looks self-explanatory, but how to upload. I suppose HTTP Object is intended for this, but I don't understand it. Could anyone help me, and briefly explain it to me?

    Let's say, I want to upload mydatabase.dat to mysite.com

    In actions there is:

    1. Add file - what argument name means? (same with add number and string)

    2. Set user agent - what is it and usage?

    3. Requests - what is it and usage?

  • Help anybody? I'll probably need user name and password to communicate with the server and upload the file, is it safe with Construct? How can I do it? Is it possible with events or Python only?

  • Online functionality is one of the bigger weaknesses of Construct.

    Of course the Download object does its job fine for downloading, but I'm afraid there is no object that is able to directly upload files.

    With the HTTP Object you can communicate with websites, such as passing arguments through a PHP script/HTML form. I've used it before to create a simple flatfile highscore table.

    I haven't used the object in quite a while, but together with a proper PHP upload script, it should be able to get the job of uploading a file done.

    In actions there is:

    1. Add file - what argument name means? (same with add number and string)

    2. Set user agent - what is it and usage?

    3. Requests - what is it and usage?

    1. See above - adding arguments when you post to a site basically. Like it could pass the username, a password and a message, all being different arguments.

    2. User agent would be the string which is used to identify your browser, to be able to choose the appropriate content to display for example.

    3. 'Get' and 'Post' would obviously refer to the HTTP methods of the same names. Take a look here maybe. With 'Get' you could also download any site as a string, which would be returned in the expression 'HTTP.GetResponse'. And with 'Post', well, you usually post stuff.

    Keep in mind that I'm no authority on these online matters though, I hope I was able to provide some insight at least. Anyone able to add to that or correct me by all means do post!

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Thanks for your help, I've solved it, kind of, so when I'm finished with it I'll post it here.

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