Forum GameFS How to upload?

Discussion and help relating to the PlayerIO game asset hosting and CDN solution, GameFS.

How to upload?

Postby Calipsoo » July 20th, 2016, 10:07 pm

Noob here,

How do I upload something to the GameFS service?
Any tutorials you can recommend?

Thanks,
Calipsoo
 
Posts: 5
Joined: July 20th, 2016, 5:46 pm

Re: How to upload?

Postby ChristianD » July 21st, 2016, 8:02 am

When you have created a game, there's a GameFS section in the admin panel that has an interface for navigating the GameFS filesystem for that game, and you can upload files right there.

Was there anything specific you were having issues with?
Christian
ChristianD
.IO
 
Posts: 63
Joined: May 13th, 2016, 4:44 am

Re: How to upload?

Postby Calipsoo » July 21st, 2016, 12:56 pm

Ah gotcha now, I was looking at the GameFS section in the documentation :s

Is it possible to have the players upload content to GameFS at runtime?
Will I need edit to edit the server code or is there a better way of doing it?
The idea is to have player made content available and persistent across playthroughs.
Calipsoo
 
Posts: 5
Joined: July 20th, 2016, 5:46 pm

Re: How to upload?

Postby Calipsoo » July 21st, 2016, 4:56 pm

Ok I'm using <a href="http://www.marstonstudio.com/2007/10/19/how-to-take-a-snapshot-of-a-flash-movie-and-automatically-upload-the-jpg-to-a-server-in-three-easy-steps/">this solution</a> to try n get an image into GameFS at runtime and getting this error:

*** Security Sandbox Violation ***
Connection to sftp.playerio.com:22 halted - not permitted from file:///C|/Users ...
[Fault] exception, information=SecurityError: Error #2147: Forbidden protocol in URL sftp.playerio.com:22.

<code>

var urlRequest:URLRequest = new URLRequest("sftp.playerio.com:22");
urlRequest.contentType = 'multipart/form-data; boundary=' + UploadPostHelper.getBoundary();
urlRequest.method = URLRequestMethod.POST;
urlRequest.data =
UploadPostHelper.getPostData(
'ship2.png',
byteArray,
{
username:"my username",
pass:"my password"
} );
urlRequest.requestHeaders.push( new URLRequestHeader( 'Cache-Control', 'no-cache' ) );

// create a loader & send the file to the server;
var urlLoader:URLLoader = new URLLoader();
urlLoader.dataFormat = URLLoaderDataFormat.BINARY;
urlLoader.load( urlRequest );
</code>

No idea what parameters to pass to gain access but it seems to be the right location.
I figure it must be something standard as they recommend a 3rd party SFTP client for normal uploads.
Any ideas?
Calipsoo
 
Posts: 5
Joined: July 20th, 2016, 5:46 pm

Re: How to upload?

Postby ChristianD » July 21st, 2016, 5:14 pm

Ok, that explains what you wanted to do.

No, there is no API for uploading files to GameFS from clients, and SFTP is a special secure protocol that you can't send data through with an URLRequest, you need to embed an SFTP client into whatever code that should do the uploads for that to work.
Christian
ChristianD
.IO
 
Posts: 63
Joined: May 13th, 2016, 4:44 am

Re: How to upload?

Postby Calipsoo » July 21st, 2016, 5:23 pm

Hmm, do you know of a SFTP client that will embed into AS3?
Or another service that easier to upload to?

Thank you!
Calipsoo
 
Posts: 5
Joined: July 20th, 2016, 5:46 pm


Return to GameFS