Uploading files to web server

1 favourites
  • 5 posts
From the Asset Store
The official Scirra Multiplayer Signalling Server for helping peers find and connect to each other
  • Is it possible to use the file chooser to upload files to a server?

    I can grab the blob of the video from the File Chooser's URL, but something tells me that won't be too useful.

    I'd like upload a file to a specific folder on my server based on the current user. I've considered using binary, which may work, but I was wondering if there was a better way using the new HTML Element.

    Originally, I'd have considered doing this with ajax and php, but I'm not sure what I need to send. The file type would ideally be webm, but I'd need a file size locked to 1mb.

    I've seen other people ask this question, and one post a picture of an answer, which has now been deleted :( So any help would be appreciated :)

  • It's possible by using AJAX to post binary data.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's possible by using AJAX to post binary data.

    I've used binary data to transfer images between multiplayer games, but on the server, would I need to decrypt it, or something using php?

    I've tried searching for answers online, but everywhere I get only half the answer.

  • If you use AJAX to post binary data to the server, then the server will receive all the binary data with the request. Nothing is encrypted or needs decrypting, it just sends the raw data.

    Reading POST data server-side is out of scope of this forum really, it's just a general server coding topic. Sites like StackOverflow are probably a better place for that kind of question.

  • If you use AJAX to post binary data to the server, then the server will receive all the binary data with the request. Nothing is encrypted or needs decrypting, it just sends the raw data.

    Reading POST data server-side is out of scope of this forum really, it's just a general server coding topic. Sites like StackOverflow are probably a better place for that kind of question.

    Agreed, which is why StackOverflow was the first place I looked, and followed multiple attempts. I came here in the hope that other people had indeed successfully done this and could share said info.

    There are a few examples of people doing this, but either the dropbox example or images were deleted. Likely before the new website update.

    If I can solve it, I'll happily post the solution here, but it's been a few days now of trial and error, with no solution.

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