jhipster / jhipster/generator-jhipster-nodejs

Nhipster blob entity generator issue front angular

Open
#201 21 comments 0 reactions 0 assignees View on GitHub
bug enhancement
Dominant language
EJS
Stars
262
Forks
89
Avg merge
1h 9m
Merged PRs (30d)
15

Description

##### **Overview of the issue**
How to fix Blob front Angular view issue ?

##### **Motivation for or Use Case**
When you use nhipster entity generator with an angular front. Angular can't render the image of the blob after beeing storage in database.

##### **Reproduce the error**
use nhipster entity generator and you will have issue to view blob from backend.

##### **Suggest a Fix**
when the service nest get the blob image from the server, the image is convert in an buffer of hexadecimal. So I had to fix the service to add a converter hexaToString like the following function :
const blob = roadMap.image.toString('hex');
var result = '';
for (var i = 0; i < blob.length; i = i + 2) {
var decval = parseInt(blob.substr(i, 2), 16);
result = result + String.fromCharCode(decval);
}

##### **JHipster Version(s)**
last version

##### **JHipster configuration**
nhipster

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the entity generator using an Angular front end and a blob image stored in the database. Inspect the generated Angular view and Nest service response to trace the image data; done means the stored blob renders correctly in the generated front end. The issue's suggested hexadecimal conversion can help guide the investigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, nodejs
Domain
backend, databases, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.