No custom headers for Flash file upload. Why?

Monday 20 October 2008  –  Filed under: Flash  –  3 Comments

ActionScript iconI got excited when I learned that YouTube opened their API for third party developers. This would enable me to – for example – create a nifty AIR widget to quickly upload videos to my YouTube account. Drag-and-drop a video file onto the AIR app and have the uploading done in the background. Cool!

So I took off, did the authentication stuff with the ClientLogin API so I was able to login into my YouTube account with Flash.

Next: add uploading functionality. Again, the docs are clear and I’m halfway done when I re-read the URLRequest.requestHeaders documentation, only to find out that custom headers (required for the YouTube upload to succeed) are not supported by FileReference.upload!

So much for my YouTube upload AIR widget…

Adobe, PLEASE consider removing this restriction from a future Flash player. Or please tell me why this restriction is imposed on the upload method, as I fail to see why we shouldn’t be allowed to create our own POST request headers for the upload method.

3 Responses

  1. mdvisser says:

    No Comments? This is why: I switched themes and needed to rebuild the database – this went quite well, but the comments for this post (and this post only) have disappeared. Sorry about that.

  2. Nat says:

    I realise I have not long left a comment but I have reliase your flv player will not longer allow you to set the window to stay at the front of other windows or stay behind. The last version .24 had it and I find it handy. So if you are reading my prior wishlist can you add that to it.

    Thanks

  3. Eugene says:

    You can use custom URLLoader class to upload files
    for example I did one when I need it: http://blog.inspirit.ru/?p=139
    so you can modify it and add custom headers

    also there are some libs that give you ability to build custom uploader like as3httpclient (search google code) it was build specialy for AIR

Leave a Reply