mirror of
https://github.com/diced/zipline.git
synced 2025-12-25 04:15:41 -08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19d2c63ea9 | ||
|
|
70b5ff7562 | ||
|
|
15367f0495 | ||
|
|
306b8812e2 | ||
|
|
06c57851e4 |
20
README.md
20
README.md
@@ -1,15 +1,15 @@
|
||||
<p align="center"><img src="https://raw.githubusercontent.com/ZiplineProject/zipline/next/public/zipline_small.png"/></p>
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
[](https://discord.gg/AtTSecwqeV)
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
<br>
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
# Zipline
|
||||
The best and only **React + Next.js** ShareX / File Uploader you would ever want.
|
||||
@@ -19,7 +19,7 @@ Wondering how Zipline compares to other popular uploaders? We have done some ben
|
||||
|
||||
| Uploader | Average ms (3 batches/1.5k files) |
|
||||
|-|-|
|
||||
| **[Zipline](https://github.com/dicedtomatoreal/zipline)** | **61 ms** |
|
||||
| **[Zipline](https://github.com/diced/zipline)** | **61 ms** |
|
||||
| [ShareX-Upload-Server](https://github.com/TannerReynolds/ShareX-Upload-Server) | 86 ms |
|
||||
|
||||
*Note: there were 3 batches of 1.5k requests, the average ms of each was averaged again*<br>
|
||||
@@ -35,4 +35,4 @@ Wondering how Zipline compares to other popular uploaders? We have done some ben
|
||||
- Easy setup instructions on [docs](https://zipline.diced.wtf/docs)
|
||||
|
||||
# Installing
|
||||
[See how to install here](https://zipline.diced.wtf/docs/)
|
||||
[See how to install here](https://zipline.diced.wtf/docs/)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "zipline-next",
|
||||
"version": "2.5.4",
|
||||
"version": "2.5.7",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@dicedtomato/colors": "^1.0.3",
|
||||
@@ -62,6 +62,7 @@
|
||||
"eslint-plugin-react": "^7.21.3",
|
||||
"mongodb": "^3.6.2",
|
||||
"prettier": "2.1.2",
|
||||
"release": "^6.3.0",
|
||||
"ts-node": "^9.0.0",
|
||||
"typescript": "^4.0.3"
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ export class RootController {
|
||||
|
||||
if (!existsSync(config.uploader.directory)) mkdirSync(config.uploader.directory);
|
||||
|
||||
const ext = data.filename.split('.')[1];
|
||||
const ext = data.mimetype === 'application/octet-stream' ? 'bin' : data.filename.split('.')[1];
|
||||
if (config.uploader.blacklisted.includes(ext)) return sendError(reply, 'Blacklisted file extension!');
|
||||
|
||||
const fileName = config.uploader.original
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
||||
// @ts-nocheck
|
||||
|
||||
import React from 'react';
|
||||
import { useRouter } from 'next/router';
|
||||
import Typography from '@material-ui/core/Typography';
|
||||
@@ -60,41 +63,45 @@ export default function Upload() {
|
||||
}
|
||||
};
|
||||
|
||||
const snack = (
|
||||
<Snackbar
|
||||
anchorOrigin={{
|
||||
vertical: 'top',
|
||||
horizontal: 'center'
|
||||
}}
|
||||
open={alertOpen}
|
||||
autoHideDuration={6000}
|
||||
onClose={() => setAlertOpen(false)}
|
||||
>
|
||||
<Alert severity={alertSev} variant='filled'>
|
||||
{alertMsg}
|
||||
</Alert>
|
||||
</Snackbar>
|
||||
);
|
||||
|
||||
if (typeof window === 'undefined') return <UIPlaceholder />;
|
||||
if (!state.loggedIn) router.push('/user/login');
|
||||
else {
|
||||
return (
|
||||
<UI>
|
||||
<Snackbar
|
||||
anchorOrigin={{
|
||||
vertical: 'top',
|
||||
horizontal: 'center'
|
||||
}}
|
||||
open={alertOpen}
|
||||
autoHideDuration={6000}
|
||||
onClose={() => setAlertOpen(false)}
|
||||
>
|
||||
{/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
|
||||
{/* @ts-ignore */}
|
||||
<Alert severity={alertSev} variant='filled'>
|
||||
{alertMsg}
|
||||
</Alert>
|
||||
</Snackbar>
|
||||
<Paper elevation={3} className={classes.padding}>
|
||||
<Typography variant='h5'>
|
||||
Upload
|
||||
</Typography>
|
||||
<Box m={1}>
|
||||
<DropzoneArea
|
||||
acceptedFiles={['image/*']}
|
||||
dropzoneText={'Drag an image or click to upload an image.'}
|
||||
onChange={f => setFiles(f)}
|
||||
filesLimit={1}
|
||||
maxFileSize={1073741824} // 1gb in byte
|
||||
/>
|
||||
</Box>
|
||||
<Button onClick={handleFileUpload}>Upload</Button>
|
||||
</Paper>
|
||||
<>
|
||||
{snack}
|
||||
<Paper elevation={3} className={classes.padding}>
|
||||
<Typography variant='h5'>
|
||||
Upload
|
||||
</Typography>
|
||||
<Box m={1}>
|
||||
<DropzoneArea
|
||||
acceptedFiles={['image/*']}
|
||||
dropzoneText={'Drag an image or click to upload an image.'}
|
||||
onChange={f => setFiles(f)}
|
||||
filesLimit={1}
|
||||
maxFileSize={1073741824} // 1gb in byte
|
||||
/>
|
||||
</Box>
|
||||
<Button onClick={handleFileUpload}>Upload</Button>
|
||||
</Paper>
|
||||
</>
|
||||
</UI>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user