File uploads using as3httpclient + HTTP PUT method

39 views
Skip to first unread message

mike503

unread,
Jul 31, 2008, 7:46:39 PM7/31/08
to as3httpclient
Has anyone done this?

My company is looking for a file uploader that does.

It would be a bonus if it:
- Retried on failure and timeouts
- Had stop/resume capability
- UI was customizable
- Supported multiple files
- Had file upload progress bar

We don't want to go a Java/Silverlight route if we can help it. IT
sounds like as3httpclient has PUT support and was just hoping someone
out there might have swapped out the standard flash library calls with
as3httpclient calls...?

Thanks...

EECOLOR

unread,
Aug 1, 2008, 4:02:40 AM8/1/08
to as3htt...@googlegroups.com

I don't think PUT it is implemented yet. The project has less attention now because of the new security restrictions on the latest Flash player.

These restrictions make the socket class less usefull. If you want to connect to a socket the Flash player needs authorisation, more about this can be found here: http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_04.html

The bottom line is:

- If you are using AIR to build your application, this is very doable and could be implemented using the Socket class

- If you are connecting to a server of your own, you would need a socket server on port 843 to grant access to the http socket. After that the feature could be implemented using the Socket class.

In your email you write:

It would be a bonus if it:
- Retried on failure and timeouts
- Had stop/resume capability
- UI was customizable
- Supported multiple files
- Had file upload progress bar


The FileReference class could help you with most of these things.

- Retried on failure and timeouts

You could add a listener for failure and let your code retry

- Had stop/resume capability

Not sure if this is available for FileReference

- UI was customizable
- Supported multiple files
- Had file upload progress bar

These can all be accomplished using FileReference.

Greetz Erik

eec...@gmail.com

unread,
Aug 1, 2008, 4:04:29 AM8/1/08
to as3httpclient
> I don't think PUT it is implemented yet.

Oops, this should be: "I do not think PUT is implemented yet."


Greetz Erik

mike503

unread,
Aug 17, 2008, 3:20:56 PM8/17/08
to as3httpclient
On Aug 1, 1:02 am, EECOLOR <eeco...@gmail.com> wrote:

> I don't think PUT it is implemented yet. The project has less attention now
> because of the new security restrictions on the latest Flash player.

That's lame. I hate Java!

> These restrictions make the socket class less usefull. If you want to
> connect to a socket the Flash player needs authorisation, more about this
> can be found here:http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_04...

Authorization would only be using a cookie. Not HTTP auth. Would it
support cookies?

> The bottom line is:
>
> - If you are using AIR to build your application, this is very doable and
> could be implemented using the Socket class
>
> - If you are connecting to a server of your own, you would need a socket
> server on port 843 to grant access to the http socket. After that the
> feature could be implemented using the Socket class.

I'd want to connect to a standard http or https webserver and handle
it via a PHP script.

> *- Retried on failure and timeouts*
>
> You could add a listener for failure and let your code retry
>
> *- Had stop/resume capability*
>
> Not sure if this is available for FileReference

Couldn't a "stop" be a forced "failure" or "timeout" basically and
allow an option to manually resume/restart instead of auto resume/
restart?

EECOLOR

unread,
Aug 20, 2008, 4:31:45 PM8/20/08
to as3htt...@googlegroups.com
>I'd want to connect to a standard http or https webserver and handle
>it via a PHP script.

I am very sorry to say, but using the AS3HTTPClient that will be
impossible. The AS3HTTPClient connects over a socket that has to obey
the security shizzle in the Flash player (the story about port 843).

>Would it support cookies?

It would not. Since the socket is not connecting over http using the
browser engine cookies are not accessible. The socket implements it's
own implementation of the http protocol and has no way to access
browser cookies. You could however implement cookie support yourself
as cookies are merely http headers.

>Authorization would only be using a cookie.

The autorization I meant was authorizing the Flash player to connect
using the socket class. This authorization can be done in 2 ways:

1. Serving a socket domain policy file on port 843
2. Serving a socket domain policy file on the port you are connecting
to (in case of http, port 80)


Greetz Erik

Reply all
Reply to author
Forward
0 new messages