Skip to content

Commit

Permalink
use query instead of body for url
Browse files Browse the repository at this point in the history
  • Loading branch information
PipeItToDevNull committed Nov 3, 2024
1 parent 6d27d0e commit 73000ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ const handleAnalyzeDmp = async (req, res) => {
const filePath = path.join(uploadsDir, req.file.originalname);
logger.info(`File uploaded: ${filePath}`);
analyzeFile(filePath, res);
} else if (req.body.url) {
} else if (req.query.url) {
// If a URL is provided
const encodedUrl = req.body.url;
const encodedUrl = req.query.url;
const url = decodeURIComponent(encodedUrl); // Decode the URL
const fileName = path.basename(url);
const filePath = path.join(uploadsDir, fileName);
Expand Down

0 comments on commit 73000ea

Please sign in to comment.