DroneDeploy
Search…
Exporter.createAutoExport
note: Use this example in the AutoExportsExplorer app-zone
note: We ask for folderID in this example, but there can be other parameters
1
<!DOCTYPE html>
2
<html lang="en">
3
4
<head>
5
<meta charset="UTF-8">
6
<title>Document</title>
7
<style>
8
.title {
9
font-size: 1.3em;
10
font-weight: 500;
11
}
12
13
.sans {
14
font-family: Lato, sans-serif;
15
color: rgba(0, 0, 0, 0.87);
16
}
17
18
label {
19
font-weight: 300;
20
}
21
22
input {
23
border: none;
24
border-radius: 0;
25
border-bottom: 1px solid #039be5;
26
width: 100%;
27
font-size: 0.8em;
28
margin-left: auto;
29
}
30
31
.btn {
32
border: none;
33
background-color: #039be5;
34
/*border-radius: 5px;*/
35
font-size: 14px;
36
font-family: Lato;
37
font-weight: 500;
38
color: white;
39
padding: 10px 16px;
40
margin-top: 10px;
41
flex-basis: 100%;
42
width: 100%;
43
}
44
45
.form-group {
46
width: 100%;
47
display: inline-flex;
48
justify-content: flex-start;
49
}
50
</style>
51
</head>
52
53
<body>
54
<h1 class="title sans">Export.createAutoExport example</h1>
55
<div class="form-group">
56
<input class="sans" type="text" id="folder-id" placeholder="Folder ID" />
57
</div>
58
<br>
59
<div class="form-group">
60
<input class="sans" type="url" id="folder-endpoint" placeholder="Endpoint for getting metadata about destination folder" />
61
</div>
62
<br>
63
<button type="button" id="auto-export-button" class="btn">Create Auto Export</button>
64
<span id="exportMessage"></span>
65
<script>
66
var createAutoExportBtn = document.getElementById('auto-export-button');
67
var folderEndpointValue = document.getElementById('folder-endpoint');
68
var folderConfigValue = document.getElementById('folder-id');
69
70
new DroneDeploy({
71
version: 1
72
})
73
.then(function(dronedeployApi) {
74
createAutoExportBtn.addEventListener('click', function(event) {
75
event.preventDefault();
76
77
dronedeployApi.Exporter.createAutoExport(
78
folderEndpointValue.value,
79
{ folderId: folderConfigValue.value },
80
).then((autoExportSetting) => console.log('Auto Export: ', autoExportSetting));
81
});
82
});
83
</script>
84
</body>
85
86
</html>
Copied!
Last modified 2yr ago
Copy link