Welcome!

Rob Gonda

Subscribe to Rob Gonda: eMailAlertsEmail Alerts
Get Rob Gonda via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Related Topics: RIA Developer's Journal

RIA & Ajax: Article

Uploading A File Via AJAX

It is not possible. Lol, well, ok...

Posted At : August 1, 2006 11:13 PM | Posted By : Rob Gonda
Related Categories:
ajax

It is not possible.

Lol, well, ok.... the XMLHttpRequest cannot send multipart/form-data, therefore, cannot upload files. There are two ways around this:

1) Use an iframe. This can be transparent, e.g. using the dojo.io.bind will do it automatically.

2) Use a pixel Flash movie. You can create a 1 pixel flash movie, interface with it using the external interface (Flash 8 required), and use the Flash buffer classes (Flash 9 required) to upload the file. The nice thing about this is that you get the total bytes transferred count, thus you can display an accurate progress bar.

I'll try to post an example of both options soon.

More Stories By Rob Gonda

Rob Gonda is an industry visionary and thought leader, speaks on emerging technologies conferences nationwide, and combines unique approaches to technology and marketing strategies. He is the former Editor-in-Chief of the AJAX Developer’s Journal, an Advanced Certified Coldfusion Developer, member of the Adobe Community Experts, frequent contributor to the CFDJ and ADJ, co-author of Real-World AJAX: Secrets of the Masters, author of AjaxCFC, holds a BS in computer science and engineering and an MBA with a specialization in entrepreneurship. Rob recently joined Sapient from ichameleon/group/ where he was a founding partner and chief technical officer. He is part of the global technology leadership team, and brings with him over ten years of experience in web development and 360 marketing campaigns for clients such as Adobe, Coca-Cola, Guinness, Toyota, Taco Bell, NBC, and others. He specializes in emerging technologies, marketing strategy, social media, and he is currently fascinated with rich internet applications, service oriented architecture, mobile, agile methodology, automation, behavioral targeting, multi-channel synergy, and identifying new trends. Rob’s mission is to develop forward-thinking expertise that will ensure clients are always on par with rapidly changing technologies and maintain its ethos of evolving. You can reach him at rob[at]robgonda[dot]com and read his blog is at http://www.robgonda.com

Comments (7) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
j j 09/21/06 08:01:50 PM EDT

It is not possible. Lol, well, ok.... the XMLHttpRequest cannot send multipart/form-data, therefore, cannot upload files. There are two ways around this.

news desk 08/02/06 09:07:44 PM EDT

It is not possible. Lol, well, ok.... the XMLHttpRequest cannot send multipart/form-data, therefore, cannot upload files. There are two ways around this.

SYS-CON Belgium News Desk 08/02/06 02:42:24 PM EDT

It is not possible. Lol, well, ok.... the XMLHttpRequest cannot send multipart/form-data, therefore, cannot upload files. There are two ways around this.

AJAXWorld News Desk 08/02/06 01:51:10 PM EDT

It is not possible. Lol, well, ok.... the XMLHttpRequest cannot send multipart/form-data, therefore, cannot upload files. There are two ways around this.

AJAXWorld News Desk 08/02/06 01:39:14 PM EDT

It is not possible. Lol, well, ok.... the XMLHttpRequest cannot send multipart/form-data, therefore, cannot upload files. There are two ways around this.

AJAXWorld News Desk 08/02/06 12:33:41 PM EDT

It is not possible. Lol, well, ok.... the XMLHttpRequest cannot send multipart/form-data, therefore, cannot upload files. There are two ways around this.

AJAXWorld News Desk 08/02/06 12:33:09 PM EDT

It is not possible. Lol, well, ok.... the XMLHttpRequest cannot send multipart/form-data, therefore, cannot upload files. There are two ways around this.