Hello everyone, is it possible to upload images in Grafana? I found an endpoint to fetch images from a selected directory, but I need to add the ability to upload new images to this directory via a request. Are there any options to implement this?
Here’s the code to fetch the images:
getDataSourceSrv()
.get('-- Grafana --')
.then((ds) => {
ds.listFiles('img/bg', 10).subscribe({
next: (frame) => {
const cards = [];
frame.forEach((item) => {
const idx = item.name.lastIndexOf('.');
cards.push({
value: `img/bg/${item.name}`,
label: item.name,
search: (idx ? item.name.substring(0, idx) : item.name).toLowerCase(),
imgUrl: `public/img/bg/${item.name}`,
});
});
setImgs(cards);
},
});
});