/api/item/addFromPaths
POST Add multiple local files to Eagle App.
Parameter
Description
path
Required, the path of the local files.
name
Required, the name of images to be added.
website
The Address of the source of the images.
annotation
The annotation for the images.
tags
Tags for the images.
folderId
If this parameter is defined, the image will be added to the corresponding folder.
Sample Code:
1
var data = {
2
"items": [
3
{
4
"path": "C://Users/User/Downloads/test.jpg",
5
"name": "アルトリア・キャスター",
6
"website": "https://www.pixiv.net/artworks/83585181",
7
"tags": ["FGO", "アルトリア・キャスター"],
8
"annotation": "久坂んむり"
9
},
10
{
11
"path": "C://Users/User/Downloads/test2.jpg",
12
"name": "アルトリア・キャスター",
13
"website": "https://www.pixiv.net/artworks/83585181",
14
"tags": ["FGO", "アルトリア・キャスター"],
15
"annotation": "久坂んむり"
16
}
17
],
18
"folderId": "KEHB8I2C9F23H"
19
};
20
21
var requestOptions = {
22
method: 'POST',
23
body: JSON.stringify(data),
24
redirect: 'follow'
25
};
26
27
fetch("http://localhost:41595/api/item/addFromPaths", requestOptions)
28
.then(response => response.json())
29
.then(result => console.log(result))
30
.catch(error => console.log('error', error));
Copied!
Results Returned:
1
{
2
"status": "success"
3
}
Copied!
Copy link