Downloading Poster image

A place for developers to advertise their enabled app and get help from other developers with the API.
Post Reply
Posts: 1
Joined: Tue Jan 29, 2019 12:21 pm

Tue Jan 29, 2019 12:50 pm


I use a node.js server with the nest.js framework. In my service I try to download and save a poster image to my hard drive. I tried it via the swagger api and via postman and it works. But when I save it via my service I can't open the file but the binary code is in the file. So I think there is a parsing missing or something.

Code: Select all

            .subscribe(resp => {
                let fileName = imageURL.toString();
                fileName = fileName.substring(imageURL.indexOf("/") + 1);
                this.writeImagesToDisk(fileName, JSON.stringify( );

Code: Select all

writeImagesToDisk(imageName: string, image: any){
        fs.writeFile(API.PATH_TO_IMAGES + imageName, image, function(err){
Post Reply