brianraymes commented on issue #708: File Upload not working in Royale URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-608167534 > @brianraymes wants to know how we can add a parameter to a request header. I think we need to dig a bit in URLBinaryLoader to answer that. With the changes that @aharui has made, I no longer need to add a parameter to the request header as it displaced the need to set my own boundary data. FYI, I am currently testing with PDFs. With these latest changes, I can now successfully upload, but I am left with a few problems that I could use some help with: 1. How do I get access to the response data from the upload? I can see the XMLHttpRequest (xhr) in the FileUploaderUsingFormData bead, and the response data I need, but it is private. The servlet I am uploading to processes the file, creates a reference to it, and returns the `id` for me to use elsewhere. 2. FileFilter seems to currently do nothing as well. No matter what I try, it always seems to filter on "All Files". This is how I'm trying to set the filter: `fileReference.browse([new FileFilter("PDF", "*.pdf")]);` Even though I have the above issues, I found a way to load data without requiring an upload by adding an event listener to the model for "blobChanged", then subsequently calling `load()`. This allows me to access the byte data so that I can send it over a RemoteObject call: `fileReference.model.addEventListener("blobChanged", blobChangedHandler);` I ended up crawling through the framework to find this event. Is this the expected way to capture the load event, or more of a placeholder until this is modeled out a bit further?
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
