I have a class with a Blob field called logo, when i want to display this field i am not sure how to do it in Angular, and if Blob is the best type to store images knowing that the app is a small app with few users.
Company.java
@Entity
public class Company implements Serializable{
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name = "id", updatable = false, nullable = false)
private Long id;
@Column(name = "name", unique = true, nullable = false)
private String name;
@Column(name = "activity", nullable = false)
private String activity;
@Column(name = "address", nullable = false)
private String address;
@Column(name = "city", nullable = false)
private String city;
@Column(name = "logo", nullable = true)
private Blob logo;
}
model.company.ts
export class Company{
public id:any;
public name:string;
public activity:string;
public address:string;
public city:string;
public logo:Blob;
}
when i do it this way it doesn't show anything even other fields which are strings.
<tr *ngFor="let c of pageCompanies?.content">
<td class="py-1"><img src="{{c.logo}}" class="rounded-circle" width="45" height="45"></td>
</tr>