I usually just check the session to see if they are authenticated or not.

On Mon, Jun 30, 2008 at 1:48 PM, timgerr <[EMAIL PROTECTED]> wrote:

>   Hello all,
> I am working on a file upload application and I have a few questions.
> I want to upload a file and also send some string information to
> varify user information. Can this be done? I am using the example
> from
>
> http://www.dgrigg.com/post.cfm/08/02/2007/Flex-and-Flash-file-uploading-with-return-data
>
> Here is my code (that I took)
> <?xml version="1.0" encoding="utf-8"?>
> <!--
> Derrick Grigg
> [EMAIL PROTECTED] <derrick%40dgrigg.com>
> http://www.dgrigg.com
> created on August 2, 2007
>
> A simple file upload process with data returned from the server
> using the UPLOAD_COMPLETE_DATA event.
> -->
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> layout="absolute">
> <mx:Script>
> <![CDATA[
> public var file:FileReference;
>
> public function selectFile():void
> {
> file = new FileReference();
> file.addEventListener(Event.SELECT, fileSelected);
> file.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA,
> uploadDataComplete);
> file.addEventListener(Event.COMPLETE, uploadComplete);
> file.addEventListener(IOErrorEvent.IO_ERROR, handleError);
> file.browse();
> }
>
> public function handleError(event:IOErrorEvent):void
> {
> status_txt.text = 'ERROR: ' + event.text + '\n';
> }
> public function fileSelected(event:Event):void
> {
> file = FileReference(event.target);
> file_txt.text = file.name;
> status_txt.text = 'upload file: '+ file.name + '\n';
>
> var request:URLRequest = new URLRequest();
> request.url = "uploader.cfm";
> file.upload(request);
> }
>
> public function uploadDataComplete(event:DataEvent):void
> {
> var result:XML = new XML(event.data);
> status_txt.text += 'Upload Data Complete\n'
> status_txt.text += 'RESULT: ' + result.toString() + '\n'
> status_txt.text += 'STATUS: ' + result.status + '\n';
> status_txt.text += 'MESSAGE: '+ result.message;
> }
>
> public function uploadComplete(event:Event):void
> {
> status_txt.text += 'Upload complete\n';
>
> }
> ]]>
> </mx:Script>
> <mx:VBox>
> <mx:TextInput id="file_txt"/>
> <mx:Button id="select_btn" label="select" click="selectFile();"/>
> <mx:TextArea id="status_txt" width="400" height="200"/>
> </mx:VBox>
> </mx:Application>
>
> Thanks,
> timgerr
>
>  
>

Reply via email to