bykof / cordova-plugin-webserver

A webserver plugin for cordova
Other
120 stars 51 forks source link

Serve BIN file on GET request #13

Closed captainreptile closed 6 years ago

captainreptile commented 6 years ago

I'm looking for a way to serve a bin file (with sensitivity for changes) upon GET request, and read the callback once download was complete/successful. I understand its not possible to serve file for download using this module (no root dir) but perhaps there is a cool way like in your example?

bykof commented 6 years ago

You want to serve a bin file from an android phone with this plugin? Does I understood this correctly?

captainreptile commented 6 years ago

Yes, i want to serve a single bin file from Android/IOS and get a callback when my bin file was downloaded. After i posted my initial question i found this module that might do https://cordova.apache.org/docs/en/2.9.0/cordova/file/filereader/filereader.html

bykof commented 6 years ago

@captainreptile You could surely combine this plugin with the filereader api.

captainreptile commented 6 years ago

Would you like to take this challenge for few good tannenzapfle? :)

bykof commented 6 years ago

@captainreptile I love tannenzäpfle :D But I'm currently writing my bachelor. So there is sadly no time for open source projects.

I think that the implementation should be done in your code and not in this repository. In your own code you should retrieve a request and response with the read file.

captainreptile commented 6 years ago

@bykof I was thinking perhaps you may take this challenge and implement directly in my app - not an opensource

bykof commented 6 years ago

@captainreptile Oh, no. As I said, I am currently busy. Good luck with you app :)

captainreptile commented 6 years ago

@bykof Thank you, and wish you the best with your bachelor challenge !!

MaxymSemenykhin commented 6 years ago

I have tried same thing with respongin Uint8Array or ArrayBuffer and in first case i am getting response like {"0":137,"1":80,"2":78,"3" in seccond {} Can any one help with this issue?