Skip to content

Commit

Permalink
fix: remove filetype from file list
Browse files Browse the repository at this point in the history
  • Loading branch information
stonith404 committed Oct 10, 2022
1 parent 603d79c commit 68ce8af
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 47 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ Contact me, create an issue or directly create a pull request.

### Development setup

#### Database & Backend
#### Database & Backend

1. Open the `backend`
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`
Expand All @@ -50,9 +51,10 @@ Contact me, create an issue or directly create a pull request.
6. Start the backend with `npm run dev`

#### Frontend

1. Open the `frontend` folder
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`
4. Start the frontend with `npm run dev`

You're all set!
You're all set!
14 changes: 0 additions & 14 deletions frontend/docker-compose.yml

This file was deleted.

13 changes: 0 additions & 13 deletions frontend/src/components/share/FileList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,6 @@ const FileList = ({

const rows = files.map((file) => (
<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>{byteStringToHumanSizeString(file.size)}</td>
<td>
Expand Down Expand Up @@ -74,7 +62,6 @@ const FileList = ({
<Table>
<thead>
<tr>
<th></th>
<th>Name</th>
<th>Size</th>
<th></th>
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/components/upload/FileList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const FileList = ({
const rows = files.map((file, i) => (
<tr key={i}>
<td>{file.name}</td>
<td>{file.type}</td>
<td>{byteStringToHumanSizeString(file.size.toString())}</td>
<td>
{file.uploadingState ? (
Expand Down Expand Up @@ -47,7 +46,6 @@ const FileList = ({
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Size</th>
<th></th>
</tr>
Expand Down
16 changes: 0 additions & 16 deletions frontend/src/services/api.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import axios, { AxiosError } from "axios";
import { getCookie } from "cookies-next";
import toast from "../utils/toast.util";

const api = axios.create({
baseURL: "/api",
Expand All @@ -18,19 +17,4 @@ api.interceptors.request.use(
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;

0 comments on commit 68ce8af

Please sign in to comment.