You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2020/02/10 09:23:22 UTC

[GitHub] [royale-asjs] pashminakazi opened a new issue #708: File Upload not working in Royale

pashminakazi opened a new issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708
 
 
   Project Details are :
   https://paste.apache.org/cpo8y
   Test case is available on VDI.
   Go to Accounts Payable from Select in Menu
   Go to ATM Rental Income from Setups in Menu
   File : com/dbz/modules/AR/dbzATMRentalReceipt.mxml
   
   dbzATMRentalReceipt has a custom button named components2:dbzBtnAddAttachment with id="btnattachment" on Click fn_OpenAttachments which is opening dbzBtnAddAttachment  in PopUp. dbzBtnAddAttachment  is in DBIZCOMLIB. dbzBtnAddAttachment  has a button Upload which is not working.On Upload button a function is called 
   private function btnUploadClick_EH(event:org.apache.royale.events.MouseEvent):void {
   				var docFilter:mx.net.FileFilter = new mx.net.FileFilter("Documents", "*.pdf;*.doc;*.docx;*.txt;*.ppt;*.xls;*.xlsx;*.xlsm;*.xltx;*.xltm;*.zip;*.msg");
   				var imagesFilter:mx.net.FileFilter = new mx.net.FileFilter("Images", "*.jpg;*.jpeg;*.JPG;*.JPEG;*.tif;*.tiff;*.gif;*.png;*.bmp");
   				
   				strFileRef = new mx.net.FileReference();
   				strFileRef.addEventListener(org.apache.royale.events.Event.SELECT, fn_FileSelect_EH);				
   				strFileRef.browse([docFilter,imagesFilter]);
   			}
   
   
   In Flex on clicking Upload button it is opening a Choose File Popup from where we can select any file and upload.
   In Royale nothing happens on clicking Upload button because this function is not working.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] yishayw commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
yishayw commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-597485021
 
 
   > FYI, also attempted in this way with no affect.
   > 
   > ```
   > uploadURL.method = HTTPConstants.POST;
   > uploadURL.contentType = "multipart/form-data";
   > ```
   > 
   > The method seems to apply, but the Content Type is not included in the headers.
   
   @brianraymes, I just pushed a fix. Can you test it?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] piotrzarzycki21 commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
piotrzarzycki21 commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-606014277
 
 
   You just bring my memory back on that subject. We had issue in our application with uploading file until we have started to use FormData. Issue was caused by lack of boundaries (UploadPostHelper), cause we were setup explicitly Content-Type. More explanation how actually progress with issue is [here](https://stackoverflow.com/questions/39280438/fetch-missing-boundary-in-multipart-form-data-post).

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] yishayw commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
yishayw commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-605696362
 
 
   @brianraymes , I took a look, and it looks like you can swap
   
   ```
   var header:URLRequestHeader = new URLRequestHeader("Content-type", "multipart/form-data; boundary=" + UploadPostHelper.getBoundary());
   uploadURL.requestHeaders.push(header);
   ```
   with
   
   `(fileReference.getBeadByType(FileUploader) as FileUploader).contentType = ."multipart/form-data; boundary=" + UploadPostHelper.getBoundary()`
   
   If you or Alex don't mind testing it with your setup that would be great. I haven't thought about what it would mean to emulate Flex syntax.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] aharui commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
aharui commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-605690105
 
 
   I'm not that familiar with how uploading is supposed to work, but I thought an upload was just a POST with the data to some URL.  Are you saying something has to be downloaded before an upload is allowed?  How can, for example, someone write an app that allows uploading new photos?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] aharui commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
aharui commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-584496619
 
 
   @yishayw Do you have time to emulate FileReference on top of the FileUpload code?  You may be more familiar with this functionality than I am.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] pashminakazi commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
pashminakazi commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-597568977
 
 
   @yishayw After your today's Change 
   I have compiled your Example  : https://paste.apache.org/8n3y0
   with my file url : uploadURL.url = "http://192.168.0.14:8080/SHMA/electronic.csv";
   Network Tab : 
   ![image](https://user-images.githubusercontent.com/42200979/76410218-64386480-63b1-11ea-839e-39e2b6c07636.png)
   ![image](https://user-images.githubusercontent.com/42200979/76410261-73b7ad80-63b1-11ea-903b-b69a60c365ce.png)
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] yishayw commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
yishayw commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-605621051
 
 
   I don't thing you can upload without loading. upload() should always call FileLoaderAndUploader. The point in having FileLoader is to allow loading without uploading.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] aharui commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
aharui commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-608222770
 
 
   We want to know what your existing code looks like so we can see if we can emulate the APIs you are using.  If you can put together a small test case or provide snippets of your existing code we can try to improve the emulation. And if you want to learn how to submit PRs to help implement these APIs, even better.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] pashminakazi commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
pashminakazi commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-598067431
 
 
   @yishayw Send me your Email Address i will send you VDI credentials with Detail of setup that which file is used for attachment in which Setup
   Please i need your help on this issue its very urgent

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] aharui commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
aharui commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-605786973
 
 
   I made a change to mx.net.FileReference to use FormData.  This code worked for me with the upload service I was testing.
   
   I've overridden the FileUploader to do this.  If this turns out to be the right approach then it could use some refactoring because the FormData uses the File and not the Blob/ArrayBuffer (it didn't work correctly using Blob/ArrayBuffer).
   
   This area is definitely not my area of expertise, so I could certainly have not done something correctly.  AFAICT, the upload service I tested expects more than just the blob, it seems to require two parts (Filename and Filedata (with correct encoding)) and a boundary.  FormData seems to generate the boundary and all of the pieces for us.
   
   See aa7a65cb622977d3da4ec6a00f8cbaf8f7f284dc for the FileUploaderUsingFormData override.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] yishayw commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
yishayw commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-597712442
 
 
   @pashminakazi , Not sure I understand. Is there a new problem? Was it working before?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] brianraymes commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
brianraymes commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-595991193
 
 
   FYI, also attempted in this way with no affect.
   ```
   uploadURL.method = HTTPConstants.POST;
   uploadURL.contentType = "multipart/form-data";
   ```
   
   The method seems to apply, but the Content Type is not included in the headers.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] yishayw commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
yishayw commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-586731727
 
 
   I uploaded an example in b96bd56695bf5c0fc4c140c0a4c256a173de3edd Selection works for me. @pashminakazi , can u compare the difference between your test case and the example [1]?
   
   [1] https://github.com/apache/royale-asjs/blob/develop/examples/mxroyale/FileReference/src/main/royale/FileReference.mxml
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] yishayw commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
yishayw commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-586188619
 
 
   Does the upload() method get called after file selection? If so, can you see in the network tab which request is made? If you can see the request, can you see how it's different from what you would expect?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] aharui commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
aharui commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-605600444
 
 
   @yishayw Can you explain how the code is supposed to work?  I built the example and tested against an upload server and got a 400.  FileReference.upload seems to be using FileLoaderAndUploader but there isn't a file to load in my case, if I understand the code correctly.  How is FileReference supposed to know whether to use FileLoaderAndUploader or just FileUploader?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] brianraymes commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
brianraymes commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-595899570
 
 
   @yishayw I'm currently testing File Upload capabilities as well, and while I can browse, and supposedly send content to my java server, I see the following error when using Apache Commons FileUpload:
   
   > The request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is null
   
   In Royale, I've tried augmenting the mxroyale FileReference example by adding the following:
   
   ```
   var header:URLRequestHeader = new URLRequestHeader("Content-type", "multipart/form-data");
   uploadURL.method = "POST";
   uploadURL.requestHeaders.push(header);
   ```
   
   This seems to have no affect what-so-ever. The content, while arriving to my java server, still contains no Content-Type.
   
   Also, in Royale, how do we access the file data from a FileReference? It always seems to be null. I have other cases where I send byte arrays over RemoteObject calls, but can't seem to access the byte data after browsing for a file.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] pashminakazi commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
pashminakazi commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-586195072
 
 
   upload method of FileReference is not called

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] yishayw commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
yishayw commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-605916683
 
 
   We also have FileModelWithParams which uses FormData. I don't know if you could have used that instead, but I guess we can have both. With FileReference I think the question is what flash did and how well we're emulating that. FWIW, I'm not an expert on this either.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] aharui commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
aharui commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-585851316
 
 
   @yishayw Do you have time to migrate the ASDoc example and get it to run?
   https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference.html#includeExamplesSummary
   
   That might be a good test for anyone else needing to use/test the emulation.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] yishayw edited a comment on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
yishayw edited a comment on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-585659615
 
 
   I'm not sure how to access the test case on VDI. I did commit an untested implementation. @pashminakazi , can you please test this and let me know? If there are errors, please attach a standalone test case so I can debug.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] yishayw commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
yishayw commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-605692877
 
 
   This is the code that actually performs the upload
   
   ```
   			var binaryUploader:URLBinaryLoader = new URLBinaryLoader();
   			var req:URLRequest = new URLRequest();
   				req.contentType = contentType;
   
   			req.method = "POST";
   			req.data = (host.model as IFileModel).blob;
   			req.url = url;
   			binaryUploader.addEventListener(Event.COMPLETE, completeHandler);
   			binaryUploader.load(req);
   
   ```
   'loaded' means req.data = (host.model as IFileModel).blob is populated. There's no download, just a loading of a local file to memory.
   
   @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.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] aharui commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
aharui commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-605785454
 
 
   @yishayw I could not find UploadPostHelper in our code, only on the internet, and it looked like it wasn't ALv2 compatible.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] aharui commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
aharui commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-606081272
 
 
   What Flash sends is documented in the ASDoc for FileReference: https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference.html#includeExamplesSummary
   
   Just search for "Content-Type" on that page.  The FileModel variants seem to use Blob instead of File and I was unsuccessful using Blob.  Only when I switched to File did I get FormData to do the right thing.
   
   And I only tested with a zip file.  So not sure what we'll get with other file types.
   
   I think if there are further issues (like incorrect content-type for the file data), we may have to write our own version of a multi-part form-data generator, but I don't think we can use UploadPostHelper because of its licensing (currently cc-by-nc-sa)
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] yishayw edited a comment on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
yishayw edited a comment on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-605696362
 
 
   @brianraymes , I took a look, and it looks like you can swap
   
   ```
   var header:URLRequestHeader = new URLRequestHeader("Content-type", "multipart/form-data; boundary=" + UploadPostHelper.getBoundary());
   uploadURL.requestHeaders.push(header);
   ```
   with
   
   `(fileReference.getBeadByType(FileUploader) as FileUploader).contentType = "multipart/form-data; boundary=" + UploadPostHelper.getBoundary()`
   
   If you or Alex don't mind testing it with your setup that would be great. I haven't thought about what it would mean to emulate Flex syntax.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] brianraymes commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
brianraymes commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-598411034
 
 
   @yishayw The change made does now include "multipart/form-data", but is still rejected by Apache Commons FileUpload as the boundary parameter is required according to the RFC. I'm not sure how the original Flex was doing this, but this is how I was using it:
   
   ```
   var header:URLRequestHeader = new URLRequestHeader("Content-type", "multipart/form-data; boundary=" + UploadPostHelper.getBoundary());
   uploadURL.requestHeaders.push(header);
   ```
   
   How can I add my own headers and or change the HTTP method?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] yishayw commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
yishayw commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-585659615
 
 
   I'm not sure how to access the test case on VDI. I did commit an untested implementation. @pashminakazi , can you please test this and let me know? If there are errors, please attache a standalone test case so I can debug.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] pashminakazi commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
pashminakazi commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-586120129
 
 
   @yishayw Now Upload browser is opening and i can choose a file to upload but file is not uploading

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] yishayw commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
yishayw commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-586202566
 
 
   It might take me a few days before I can debug this. In the browser can you put breakpoints in
   
   FileBrowser.fileChangeHandler(),
   FileReference.modelChangedHandler()
   and in your
   fn_FileSelect_EH()
   
   and see if they're called after selecting a file?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] yishayw commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
yishayw commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-605914369
 
 
   > @yishayw I could not find UploadPostHelper in our code, only on the internet, and it looked like it wasn't ALv2 compatible.
   
   I was assuming @brianraymes had it, I didn't mean to suggest it was part of Royale.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] pashminakazi commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
pashminakazi commented on issue #708: File Upload not working in Royale
URL: https://github.com/apache/royale-asjs/issues/708#issuecomment-598036341
 
 
   @yishayw No its not working before and after.Please make Attachment working

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [royale-asjs] brianraymes commented on issue #708: File Upload not working in Royale

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org


With regards,
Apache Git Services