forked from guangzhengli/ChatFiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request guangzhengli#29 from guangzhengli/dev
Add file size valid and good example
- Loading branch information
Showing
20 changed files
with
532 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# flyctl launch added from .gitignore | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
node_modules | ||
.pnp | ||
**/.pnp.js | ||
|
||
# testing | ||
coverage | ||
|
||
# next.js | ||
.next | ||
out | ||
dist | ||
|
||
# production | ||
build | ||
|
||
# misc | ||
**/.DS_Store | ||
**/*.pem | ||
|
||
# debug | ||
**/npm-debug.log* | ||
**/yarn-debug.log* | ||
**/yarn-error.log* | ||
**/.pnpm-debug.log* | ||
|
||
# local env files | ||
**/.env*.local | ||
|
||
# vercel | ||
**/.vercel | ||
|
||
# typescript | ||
**/*.tsbuildinfo | ||
**/next-env.d.ts | ||
**/.idea | ||
|
||
# flyctl launch added from .idea/.gitignore | ||
# Default ignored files | ||
.idea/shelf | ||
.idea/workspace.xml | ||
# Editor-based HTTP Client requests | ||
.idea/httpRequests | ||
fly.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# fly.toml file generated for chatfiles-ui on 2023-04-09T21:13:37+08:00 | ||
|
||
app = "chatfiles-ui" | ||
kill_signal = "SIGINT" | ||
kill_timeout = 5 | ||
mounts = [] | ||
primary_region = "lax" | ||
processes = [] | ||
|
||
[[services]] | ||
internal_port = 3000 | ||
processes = ["app"] | ||
protocol = "tcp" | ||
[services.concurrency] | ||
hard_limit = 25 | ||
soft_limit = 20 | ||
type = "connections" | ||
|
||
[[services.ports]] | ||
force_https = true | ||
handlers = ["http"] | ||
port = 80 | ||
|
||
[[services.ports]] | ||
handlers = ["tls", "http"] | ||
port = 443 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export const humanFileSize = (size: number): string => { | ||
const units = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]; | ||
let i = 0; | ||
while (size >= 1024 && i < units.length - 1) { | ||
size /= 1024; | ||
i++; | ||
} | ||
return `${size.toFixed(0)} ${units[i]}`; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# flyctl launch added from .gitignore | ||
**/__pycache__ | ||
**/*documents | ||
**/*pure | ||
|
||
# Environments | ||
**/.env | ||
|
||
# flyctl launch added from .idea/.gitignore | ||
# Default ignored files | ||
.idea/shelf | ||
.idea/workspace.xml | ||
# Editor-based HTTP Client requests | ||
.idea/httpRequests | ||
# Datasource local storage ignored files | ||
.idea/dataSources | ||
.idea/dataSources.local.xml | ||
|
||
# flyctl launch added from pure/.gitignore | ||
# created by virtualenv automatically | ||
pure/**/* | ||
fly.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# fly.toml file generated for chatfiles-test on 2023-04-09T21:34:21+08:00 | ||
|
||
app = "chatfiles" | ||
kill_signal = "SIGINT" | ||
kill_timeout = 60 | ||
mounts = [] | ||
primary_region = "lax" | ||
processes = [] | ||
|
||
[[services]] | ||
internal_port = 5000 | ||
processes = ["app"] | ||
protocol = "tcp" | ||
[services.concurrency] | ||
hard_limit = 25 | ||
soft_limit = 20 | ||
type = "connections" | ||
|
||
[[services.ports]] | ||
force_https = true | ||
handlers = ["http"] | ||
port = 80 | ||
|
||
[[services.ports]] | ||
handlers = ["tls", "http"] | ||
port = 443 |
Oops, something went wrong.