mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-04-17 12:43:13 +02:00
fix: remove filetype from file list
This commit is contained in:
@@ -41,7 +41,8 @@ Contact me, create an issue or directly create a pull request.
|
|||||||
|
|
||||||
### Development setup
|
### Development setup
|
||||||
|
|
||||||
#### Database & Backend
|
#### Database & Backend
|
||||||
|
|
||||||
1. Open the `backend`
|
1. Open the `backend`
|
||||||
2. Duplicate the `.env.example` file, rename the duplicate to `.env` and change the environment variables if needed
|
2. Duplicate the `.env.example` file, rename the duplicate to `.env` and change the environment variables if needed
|
||||||
3. Install the dependencies with `npm install`
|
3. Install the dependencies with `npm install`
|
||||||
@@ -50,9 +51,10 @@ Contact me, create an issue or directly create a pull request.
|
|||||||
6. Start the backend with `npm run dev`
|
6. Start the backend with `npm run dev`
|
||||||
|
|
||||||
#### Frontend
|
#### Frontend
|
||||||
|
|
||||||
1. Open the `frontend` folder
|
1. Open the `frontend` folder
|
||||||
2. Duplicate the `.env.example` file, rename the duplicate to `.env` and change the environment variables if needed
|
2. Duplicate the `.env.example` file, rename the duplicate to `.env` and change the environment variables if needed
|
||||||
3. Install the dependencies with `npm install`
|
3. Install the dependencies with `npm install`
|
||||||
4. Start the frontend with `npm run dev`
|
4. Start the frontend with `npm run dev`
|
||||||
|
|
||||||
You're all set!
|
You're all set!
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
version: '3.3'
|
|
||||||
services:
|
|
||||||
pingvin-share:
|
|
||||||
restart: "unless-stopped"
|
|
||||||
ports:
|
|
||||||
- '3000:3000'
|
|
||||||
image: stonith404/pingvin-share
|
|
||||||
environment:
|
|
||||||
- APPWRITE_FUNCTION_API_KEY=${APPWRITE_FUNCTION_API_KEY}
|
|
||||||
- PUBLIC_APPWRITE_HOST=${PUBLIC_APPWRITE_HOST}
|
|
||||||
- PUBLIC_MAX_FILE_SIZE=${PUBLIC_MAX_FILE_SIZE}
|
|
||||||
- PUBLIC_DISABLE_REGISTRATION=${PUBLIC_DISABLE_REGISTRATION}
|
|
||||||
- PUBLIC_DISABLE_HOME_PAGE=${PUBLIC_DISABLE_HOME_PAGE}
|
|
||||||
- PUBLIC_MAIL_SHARE_ENABLED=${PUBLIC_MAIL_SHARE_ENABLED}
|
|
||||||
@@ -35,18 +35,6 @@ const FileList = ({
|
|||||||
|
|
||||||
const rows = files.map((file) => (
|
const rows = files.map((file) => (
|
||||||
<tr key={file.name}>
|
<tr key={file.name}>
|
||||||
<td>
|
|
||||||
{/* <Image
|
|
||||||
width={30}
|
|
||||||
height={30}
|
|
||||||
alt={file.name}
|
|
||||||
objectFit="cover"
|
|
||||||
style={{ borderRadius: 3 }}
|
|
||||||
src={`data:image/png;base64,${new Buffer(file.preview).toString(
|
|
||||||
"base64"
|
|
||||||
)}`}
|
|
||||||
></Image> */}
|
|
||||||
</td>
|
|
||||||
<td>{file.name}</td>
|
<td>{file.name}</td>
|
||||||
<td>{byteStringToHumanSizeString(file.size)}</td>
|
<td>{byteStringToHumanSizeString(file.size)}</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -74,7 +62,6 @@ const FileList = ({
|
|||||||
<Table>
|
<Table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Size</th>
|
<th>Size</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ const FileList = ({
|
|||||||
const rows = files.map((file, i) => (
|
const rows = files.map((file, i) => (
|
||||||
<tr key={i}>
|
<tr key={i}>
|
||||||
<td>{file.name}</td>
|
<td>{file.name}</td>
|
||||||
<td>{file.type}</td>
|
|
||||||
<td>{byteStringToHumanSizeString(file.size.toString())}</td>
|
<td>{byteStringToHumanSizeString(file.size.toString())}</td>
|
||||||
<td>
|
<td>
|
||||||
{file.uploadingState ? (
|
{file.uploadingState ? (
|
||||||
@@ -47,7 +46,6 @@ const FileList = ({
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Type</th>
|
|
||||||
<th>Size</th>
|
<th>Size</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import axios, { AxiosError } from "axios";
|
import axios, { AxiosError } from "axios";
|
||||||
import { getCookie } from "cookies-next";
|
import { getCookie } from "cookies-next";
|
||||||
import toast from "../utils/toast.util";
|
|
||||||
|
|
||||||
const api = axios.create({
|
const api = axios.create({
|
||||||
baseURL: "/api",
|
baseURL: "/api",
|
||||||
@@ -18,19 +17,4 @@ api.interceptors.request.use(
|
|||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
api.interceptors.response.use(
|
|
||||||
(response) => {
|
|
||||||
return response;
|
|
||||||
},
|
|
||||||
(error: AxiosError) => {
|
|
||||||
const status = error.response?.status;
|
|
||||||
if (status == 400) {
|
|
||||||
toast.error(error.response?.data?.message ?? "An unkown error occured");
|
|
||||||
}
|
|
||||||
|
|
||||||
return Promise.reject(error);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
export default api;
|
export default api;
|
||||||
|
|||||||
Reference in New Issue
Block a user