FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Update index.js · daedroza/node-OpenDroneMap@094cd55 · GitHub

Commit 094cd55

Browse files
authored
Update index.js
Removed uncommented code, fixed comment
1 parent fbca418 commit 094cd55

1 file changed

Lines changed: 3 additions & 21 deletions

File tree

‎index.js‎

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ app.post('/task/new', addRequestId, upload.array('images'), (req, res) => {
167167
}
168168
},
169169

170-
// Unzips zip URL to data/<uuid>/ (if any)
170+
// Unzips zip URL to tmp/<uuid>/ (if any)
171171
cb => {
172172
if (req.body.zipurl) {
173173
let archive = "zipurl.zip";
@@ -177,23 +177,7 @@ app.post('/task/new', addRequestId, upload.array('images'), (req, res) => {
177177
else{
178178
let archiveDestPath = path.join(dstPath, archive);
179179

180-
download(req.body.zipurl, archiveDestPath, err => {
181-
if (err) cb(err);
182-
else{
183-
// unzip and flatten the zip file (in case there are folders in the zip)
184-
// fs.createReadStream(archiveDestPath).pipe(unzip.Parse())
185-
// .on('entry', function(entry) {
186-
// if (entry.type === 'File') {
187-
// entry.pipe(fs.createWriteStream(path.join(srcPath, path.basename(entry.path))));
188-
// } else {
189-
// entry.autodrain();
190-
// }
191-
// })
192-
// .on('close', cb)
193-
// .on('error', cb);
194-
cb();
195-
}
196-
});
180+
download(req.body.zipurl, archiveDestPath, cb);
197181
}
198182
});
199183
} else {
@@ -213,8 +197,6 @@ app.post('/task/new', addRequestId, upload.array('images'), (req, res) => {
213197
else {
214198
async.eachSeries(entries, (entry, cb) => {
215199
if (/\.zip$/gi.test(entry)) {
216-
217-
218200
fs.createReadStream(path.join(destImagesPath, entry)).pipe(unzip.Parse())
219201
.on('entry', function(entry) {
220202
if (entry.type === 'File') {
@@ -632,4 +614,4 @@ async.series(commands, err => {
632614
logger.error("Error during startup: " + err.message);
633615
process.exit(1);
634616
}
635-
});
617+
});

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL