How to single file fragment using actionscript (flex)?

I do file transfers, but the filerference API does not support file encoding. Has anyone done this before? For example, I would like to be able to upload a 1 gigabyte file from an AIR client to custom PHP / Java / etc. service.

+3
source share
3 answers

It seems that all you have to do is use the upload () procedure. The php or java service should do chunking.

var myHugeFile = new air.File('myHugeLocal.file');
myHugeFile.upload(new URLRequest("http://your.website.com/uploadchunker.php"));

There is a more detailed example of using filereference in adobe training: http://www.adobe.com/devnet/air/flex/articles/uploading_air_app_to_server.html

+1
source

:

  • FTP, , , . , , .
  • http. , AIR HTTP (- ). , BITS. , .
  • TCP UDP. . OSS, .
0

, FileReference , , , . , Fiddler, . FileReference, .

If a resume is what you need, I cannot say how you will do it with FileReference. I have uploaded small files to general messages, but this requires the flash / air client to load all bytes into the application. In the air, which may or may not crash a flash with a 1 GB file (depending on your system, I think).

0
source

Source: https://habr.com/ru/post/1706929/


All Articles