Can someone please help? Thanks in advance. Ban
--- In [email protected], "letterpigeon" <[EMAIL PROTECTED]> wrote: > > Hi, > > I've tried both method, GET and POST, but still couldn't get the > parameters to be passed correctly. > > Thanks. > Ban > > --- In [email protected], "Abdul Qabiz" <abdul.qabiz@> > wrote: > > > > Note sure, but you might need to set the method in URLRequest. > > > > request.method = URLRequestMethod.POST; > > > > -abdul > > > > On 10/29/07, letterpigeon <ban.luc@> wrote: > > > > > > Hi all, > > > > > > I'm having this strange problem while uploading file in flex > using > > > FileReference, that even though I set the the request attribute > on the > > > flex side, and I verified that before I call fileRef.upload, the > > > URLRequest object has all the attributes I set in its "data" > property. > > > But when the request arrived on the java servlet side, the > > > httprequest contains no attributes at all. Below is the code > snippet > > > that I'm using to perform the upload, this "processUpload" > method is > > > called after the user has browsed for a file, then hit upload so > I'm > > > only registering the COMPLETE event here. fileRef is a global > > > variable of type FileReference in the enclosing file. > > > private function processUpload(func:Function):void > > > > > > { > > > > > > fileRef.addEventListener(Event.COMPLETE, func); > > > > > > var request:URLRequest = new > > > URLRequest(FileImportConfigurationSource.HOST_PORT_CONTEXT + > > > "/FileUploadServlet"); > > > > > > var params:URLVariables = new URLVariables(); > > > > > > //Read file header data from UI input > > > > > > var client:FIClient = clientList.selectedItem as FIClient; > > > > > > var mnemonic:String = mnemonicList.selectedLabel; > > > > > > uploadFileId = UIDUtil.createUID().toString(); > > > > > > params.uploadFileId = uploadFileId; > > > > > > params.transmissionId = "testing"; > > > > > > request.data = params; > > > > > > fileRef.upload(request); > > > > > > } > > > > > > Anyone spot any wrongdoing in the above code? Thanks. > > > > > > Ban > > > > > > > > > > > > > > > > > -- > > -abdul > > --------------------------------------- > > http://abdulqabiz.com/blog/ > > --------------------------------------- > > >

