GeoffWillis

1

votes
0

answer
60

views

CORS issue or poorly formatted AJAX?

I have been struggling with a web-app to submit documents (.pdf, .docx...) to an instance of Tika-server (https://wiki.apache.org/tika/TikaJAXRS) and NLTK-server ( https://github.com/preems/nltk-server) over http. I've been fighting my limited knowledge of javascript/Ajax,and CORS so I've decided to...
GeoffWillis
1

votes
1

answer
205

views

Why does Visual Studio Code keep changing the working directory?

I am trying to use VS Code to work my way through the 'Flask Web Development' book. I can get the simple hello world example running from the command line but I want to use VS code for debugging etc. I modify the launch.json file to build a Flask config: 'name': 'Flask', 'type': 'python', 'request':...
GeoffWillis
0

votes
1

answer
24

views

Thought I knew what this was

In the code snippet below, I am using a service (Angular) to extract text via a fileReader, using a promise for the async part. The issue I'm having is (I believe) a scope issue and am confused by it. In my component, I declare an instance variable: myDoc : docWrapperClass. Basically when the file...
GeoffWillis
0

votes
0

answer
7

views

How to deal with FileReader returns either ArrayBuffer, or String in TypeScript

I have chased myself in a circle and now time to ask for help. I've got the following (Typescript) service that opens a file reader, and depending upon the file type, calls either readAsText(), or readAsArrayBuffer(). I have a wrapper class (MyDocument) for the text the fileReader will return, as we...
GeoffWillis