1.0.22 • Published 1 year ago
classic-url-uploader v1.0.22
URL Uploader
A Node.js package for processing uploaded CSV or Excel files containing URLs.
prerequisites
- Your file should be CSV or Excel
- The file should have a
url
column
Example of the file: example.csv
No | url | other colums... |
---|---|---|
1 | https://www.example1.com | |
2 | https://www.example2.com | |
3 | https://www.example1.com | |
4 | https://www.example3.com | |
5 | https://www.example1.com | |
6 | https://www.example3.com |
Installation
npm install classic-url-uploader
pnpm add classic-url-uploader
yarn add classic-url-uploader
Usage in your project
import { UrlUploadProcessor } from "classic-url-uploader";
In your controller of somewhere you need to use the Package
const result = await UrlUploadProcessor.uploadMultipleUrls(request as Request)
console.log(result);
Result should be error or data in the file
Sample of the result
Errors
1. When the file is not CSV or Excel file
{
status: 400,
error: 'Unsupported file type, file should be CSV/Excel'
}
2. When there is an Internal server error
{
status: 500,
error: 'Internal server error'
}
Data response
1. Read data in CSV or EXCEL file with no duplicated data
{
status: 200,
message: 'File processed successfully',
data: [
{ url: 'https://www.example1.com' },
{ url: 'https://www.example2.com' }
],
duplicatedWebsites: []
}
2. Read data in CSV or EXCEL file with duplicated urls data
{
status: 200,
message: 'File processed successfully',
data: [
{ url: 'https://www.example1.com' },
{ url: 'https://www.example2.com' }
],
duplicatedWebsites: [
{ url: 'https://www.example1.com' },
{ url: 'https://www.example1.com' },
{ url: 'https://www.example1.com' }
]
}
1.0.22
1 year ago
1.0.21
1 year ago
1.0.20
1 year ago
1.0.19
1 year ago
1.0.18
1 year ago
1.0.17
1 year ago
1.0.16
1 year ago
1.0.15
1 year ago
1.0.14
1 year ago
1.0.13
1 year ago
1.0.12
1 year ago
1.0.11
1 year ago
1.0.10
1 year ago
1.0.9
1 year ago
1.0.8
1 year ago
1.0.7
1 year ago
1.0.6
1 year ago
1.0.5
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago