Compare commits

...

602 Commits

Author SHA1 Message Date
diced
f36ab9e7b6 feat(v3.7.11): version 2025-01-08 12:47:07 -08:00
diced
34a993fcc6 fix: oauth vulnerability 2025-01-08 12:46:41 -08:00
Jay
aa9f0796ab fix: Check if route was set to /r, as it's reserved. (#643) 2024-12-24 19:32:36 -08:00
ari
c0b2dda7da feat: proper range request handling (#635)
* fix: update to @types/node@18

this fixes the type error at  line 14 of lib/datasources/Local.ts

* feat: proper range request handling

* fix: docker casing warnings

* fix: infinity in header and cleanup

* fix: types for s3 and supabase size return value

* chore: remove unneeded newline

* chore: remove leftover dev comment

* fix: don't use 206 & content-range when client did not request it
2024-12-05 14:31:42 -08:00
diced
1e507bbf9c feat: export data as json 2024-11-26 17:51:31 -08:00
hegi
6271b800c2 fix(repo): update devcontainer defaults to use bundled postgres (#585)
Co-authored-by: Jayvin Hernandez <gogojayvin923@gmail.com>
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2024-11-25 22:57:12 -08:00
Rovoska
effe1f9ec1 Update README.md (#627)
Fix documentation link to actually link to the docs
2024-10-19 23:37:19 -07:00
Guanzhong Chen
b6615621e1 fix: code scroll overflow handling (#620)
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2024-10-16 10:59:16 -07:00
William Harrison
145b1ca727 feat(ci): push to docker hub (#613 #606)
* feat(ci): push to docker hub

* feat(ci): push non-release images
2024-09-21 23:29:04 -07:00
diced
6f75bbee7b fix: thumbnail generation for audio in video container 2024-09-19 00:36:19 -07:00
diced
58a4580cf0 fix: small images resizing for no reason 2024-09-17 15:16:03 -07:00
diced
48cfa41405 feat(v3.7.10): version 2024-09-12 11:56:05 -07:00
dicedtomato
9c26d64420 Merge commit from fork 2024-09-12 11:49:11 -07:00
diced
f3638f3d6d fix: delete file on maxViews in view route (#584) 2024-08-17 20:15:51 -07:00
polymo1
8e59158769 fix: hyprland is no longer wlroots-based (#581) 2024-08-05 17:45:47 -07:00
astrid
317c7365f8 fix: audio & video scrubbing (#576)
* fix video scrubbing

* fix scrubbing for audio as well
2024-07-19 12:40:52 -07:00
Matei Radu
974e9f7fa2 fix: fix flameshot script in readme (#575)
this commit fixes the json parsing in the example flameshot script. the previous example would just return a `jq` compile error
2024-07-15 14:27:54 -07:00
diced
4330bdcc4c fix: increment views on view/code routes (#572) 2024-07-12 12:22:01 -07:00
diced
7f9de82804 fix: apply loading and disabled to text upload button 2024-07-07 12:31:23 -07:00
diced
70050afb5f fix: ratelimit positioning 2024-07-07 11:02:53 -07:00
diced
1f00dd51f9 fix: thumbnails not showing up on folder view #563 2024-06-17 20:35:38 -07:00
diced
5e37d89b18 fix: latte & spelling 2024-06-07 18:11:01 -07:00
Seaswimmer
08d3bfb36d add various accenting colors 2024-06-07 16:07:45 -04:00
Seaswimmer
56f07cb5ec add Catppuccin themes 2024-06-07 15:47:07 -04:00
diced
658cc61df0 fix: order other user files by createdAt 2024-04-27 11:55:04 -07:00
diced
d3be545548 fix: prettier issue 2024-03-05 14:26:24 -08:00
reset
c8625c1e13 Merge pull request from GHSA-j2cw-9fvc-wr4r
https://github.com/diced/zipline/security/advisories/GHSA-j2cw-9fvc-wr4r
2024-03-05 14:22:35 -08:00
diced
511f17e1a5 feat(v3.7.9): version 2024-02-29 19:25:21 -08:00
diced
5b88b59724 fix: image resizing (#527) 2024-02-26 20:21:11 -08:00
diced
1816e13879 feat: ampm modifier for dates 2024-02-01 16:24:24 -08:00
diced
1a837c02d2 feat: auto-add to folder via api 2024-02-01 16:04:52 -08:00
diced
f3634eff48 fix: image resizing #527 2024-02-01 15:53:36 -08:00
diced
23ef407dd3 fix: bytesToHuman + bigint #532 2024-02-01 15:23:12 -08:00
diced
f40803f515 feat(v3.7.8): version 2024-01-04 23:53:24 -08:00
diced
6b97d30a69 fix: update copyright year 2024-01-04 23:27:08 -08:00
diced
bd8d4e33fd fix: max-width/height on image/video (#523) 2024-01-04 23:23:22 -08:00
Vetlix
70d48dd8c3 fix: prisma invite deletion errors (#522) (#520)
* fix: handle invite deletion error

* fix: handle url deletion error

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-12-24 21:12:54 -08:00
diced
2e0a5f1d9c feat: locale and tz options for localed date strings 2023-12-24 21:06:04 -08:00
Wingy
0ab814fc11 fix: better errors for expirations (#519)
* improve error handling for file expiry

* add missing semicolons

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-12-23 23:47:19 -08:00
Jayvin Hernandez
265760fb9c fix: merge create endpoint into register route (#517)
* fix: Merge create endpoint into register and prevent non admins from creating users.

* Why

* fix: Use `count` instead of `findMany` in consideration of RAM use.

* fix: Prevent repeats registers
2023-12-23 23:45:07 -08:00
diced
76ff3817af fix: apply mimetypes to s3 objects 2023-12-19 22:42:40 -08:00
Seaswimmer
0dfe3fdcd1 fix: ahk exts in mimes.json (#511)
* added autohotkey file extension (.ahk) to mimes.json

* added ahk1 and ahk2 file extensions

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-12-19 22:19:42 -08:00
William Harrison
5a522e0375 fix: typo (#513) 2023-12-19 22:17:45 -08:00
L7NEG
b15390f26c fix: remove pointless width/height tags (#509)
* Fix Discord Embed Res Bug

* Fixed Video Embed Res For Discord Mobile

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-12-11 22:01:28 -08:00
diced
6fef197620 fix: thumbnail not showing on folders (#510) 2023-12-11 21:34:16 -08:00
diced
1d0bb2fa4f fix: folder bigint (#505) 2023-12-05 15:51:30 -08:00
diced
abb5bb5f25 fix: align image (if present) to center #503 2023-12-05 15:48:07 -08:00
diced
4061da8622 feat(v3.7.7): version 2023-11-21 20:19:37 -08:00
diced
6ef3c8274b fix: password protected non-media files (#496) 2023-11-21 20:10:09 -08:00
Florian Gareis
e5ac971c8f fix: styling on view file/upload file (#494)
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-11-21 19:48:16 -08:00
diced
b4ec1088d1 fix: update to prisma@5.1.x 2023-11-21 19:41:58 -08:00
diced
fe50bebeba feat(v3.7.6): version 2023-11-20 21:31:08 -08:00
Kashall
1f61c56f83 fix: pg int -> bigint (#484) (#459)
* fix: prisma int supports up to 2gb. Bigint supports a lot more than 2gb.

* yes, i ran `yarn migrate:dev`

* fix: cannot assign bigint to number

* fix: 'bigint' is not assignable to type 'number'.

* fix: 'bigint' is not assignable to type 'number'.

* jesus christ

* Well okay then next
2023-11-20 20:59:40 -08:00
neomoth
cabf932ca0 fix: flameshot abort (#490)
Exit script should file be 0B (aborted screenshot)

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-11-20 20:44:58 -08:00
diced
f6b995c28d feat: update pkgs & fix lint errors 2023-11-20 20:37:52 -08:00
diced
13a19ccd2b fix: build errors 2023-11-19 17:03:23 -08:00
diced
d1dea0cd92 fix: why did this randomly become a promise 2023-11-10 19:31:15 -08:00
diced
b39507b9a8 fix: actually fix dupe files #467 2023-11-10 19:24:45 -08:00
diced
633dfd4712 feat(v3.7.5): version 2023-11-05 22:35:12 -08:00
Digital
e6ed7a36d5 feat: whitelisted discord & redirect uri oauth (#469)
* Allow Redirect URI Configuration

* Prettier

* Add Whitelisted Users

* Update discord.ts

* Whitespace

* Whitespace

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-11-05 22:01:43 -08:00
diced
93cb9eec4c fix: overwriting existing files #467 2023-11-05 21:53:16 -08:00
diced
4849cd8221 fix: add warning when wordlist missing #478 2023-11-04 15:24:00 -07:00
diced
89c58044a3 fix: imported files incl size #468 2023-11-04 15:20:37 -07:00
diced
40fb11256f fix: non-english characters encoding (#471) 2023-10-08 11:06:16 -07:00
diced
d112c3a509 feat/fix: UPLOADER_RANDOM_WORDS_sEPERATOR 2023-09-29 20:06:18 -07:00
Jayvin Hernandez
23af36563f fix: no size on folders page (#465) 2023-09-29 19:53:06 -07:00
Kashall
28db15eb77 fix: util method to check if variable is not null (#458)
* chore: fix oauth truthyness

* chore: remove unused util function

* chore: lint

---------

Co-authored-by: Jayvin Hernandez <gogojayvin923@gmail.com>
2023-09-09 09:57:00 -07:00
Lucas Reis
e9054bd3e5 fix: og video type (#462) 2023-09-09 09:54:13 -07:00
diced
713f857e28 feat(v3.7.4): version 2023-08-29 15:36:43 -07:00
diced
5d6768029f fix: WEBSITE_SHOW_VERSION=false works now (#450) 2023-08-29 15:33:20 -07:00
Jayvin Hernandez
72e24a8b86 fix: trailing spaces giphy (#449) 2023-08-29 15:25:26 -07:00
diced
86c3e780d1 fix: docker size optimizations 2023-08-12 23:58:19 -07:00
diced
5102620953 fix: letters cut off #448 2023-08-08 23:48:26 -07:00
diced
4d728f9f8b fix: domain 2023-08-08 23:46:46 -07:00
dicedtomato
faf5098357 feat(v3..7.3): version 2023-07-31 19:06:28 -07:00
diced
c4066fc851 fix: change domains 2023-07-31 18:28:21 -07:00
dicedtomato
22633b8601 feat(v3.7.2): version 2023-07-31 18:12:18 -07:00
diced
b873f99d46 fix: disable chunked upload fr (#446) 2023-07-28 16:25:03 -07:00
diced
a60d9c58b8 fix: include stuff in docker build 2023-07-27 11:12:11 -07:00
Jayvin Hernandez
a2562c5ea2 fix: a lot of stuff (#441): (#410) (#440)
* fix: Compression setting works with the right files

* chore: clean up a debug log

* chore: add debug for why not webhook'd

* fix: No more temp invite when registering.

* fix: Add an error catch so server doesn't crash.

* chore: miniscule cleanup

* fix: Don't double fix dates. It was already fixed once.
2023-07-26 15:07:13 -07:00
diced
1c674d3d9f fix: unset ZIPLINE_DOCKER_BUILD in entrypoint 2023-07-24 11:26:12 -07:00
diced
fb32e9f38e fix: test caching 2023-07-23 21:38:52 -07:00
diced
6babf73e07 fix: docker caching 2023-07-23 21:06:03 -07:00
diced
d0eb442fdf fix: add debug/error logs to loadThumbnail 2023-07-23 20:36:20 -07:00
diced
d3cb9118ce fix: passing incompatible objects to workers 2023-07-22 22:39:09 -07:00
diced
7ec6d566b8 fix: readme updates 2023-07-16 11:48:08 -07:00
diced
d695211030 feat: modifier for bytes 2023-07-16 11:15:47 -07:00
dicedtomato
907e43c860 feat(v3.7.1): version 2023-07-02 14:58:54 -07:00
Jayvin Hernandez
d9fd771233 fix: Add url response for final chunk uploading. (#439)
* fix: Add url response for final chunk uploading.
Kind of like pre-releasing your URL.

* fix: Whoopsie!

* I forgor'd

* fix: remove beforeunload listener finished uploading

* fix: Redundant change.

* fix: Copy URL after chunked upload! :D

* fix: Clicc to copy URL! :D
2023-07-02 11:22:43 -07:00
Jayvin Hernandez
61c87aecdc Added optionally enabling thumbnail generation and fix meta tags for /view endpoint (#437)
* fix: Not null but is false header

* Forgot it was a string 💀

* fix: Improved twitter embedding for images

* fix: Improved twitter embedding for videos

* notFix: Add twitter's meta tags for audio

* fix: Use the full domain + raw path for meta tags.

* fix: You can now optionally enable thumbnails.

* fix: other thing ran 😔

* fix: not-null zws header check

* fix: account for return_https in core config
2023-07-01 19:04:14 -07:00
dicedtomato
5ef6c7a6de feat: funding 2023-06-22 19:08:59 -07:00
diced
0e7dde2500 feat: license (c) 2023 2023-06-19 15:11:46 -07:00
diced
3ab3202b92 fix: hidden non-media favorites (#428) 2023-06-19 11:34:10 -07:00
diced
b02adca6db fix: show no invites message (#427) 2023-06-19 11:31:15 -07:00
diced
4a254c55c8 fix: excessive worker count (#425) 2023-06-19 11:24:04 -07:00
Jayvin Hernandez
226d946ec8 fix: stuff (#423)
* fix: copying and opening another user's upload url

* fix: delete thumbnails too

* fix: return target after removing files from output

* fix: add width to fix diced/zipline#419 (can't test)

* Minor script tune-ups.

* Remove the catcher for when upload has been offloaded to chunk
2023-06-18 19:28:20 -07:00
diced
a1bc2db336 fix: thtumbnail box sizing (#415) 2023-05-30 18:33:15 -07:00
diced
86277a091c fix(invites): remvoe never option 2023-05-29 19:26:16 -07:00
diced
30dbfdaac5 fix: remove exif temp files 2023-05-29 19:14:30 -07:00
dicedtomato
5c424a2c6d feat: video thumbnails (#413) (#376)
* feat: thumbnails workers

* feat: thumbnails final

* fix: no thumbnailId

* fix: unecessary stuff
2023-05-29 19:02:18 -07:00
Jayvin Hernandez
f40d65a9f7 feat: view other user files (#408)
* feat: Add the capability of viewing another user's images as admin.

* fix: add columns, oops...

* fix: Gotta check if the user's legit before letting them see

* fix: made administrators non-viewable

* Please don't reference yourself

* fix: superAdmin > admin

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-05-23 22:34:21 -07:00
Jayvin Hernandez
a2c085719a feat: new opt bug.yml (#411)
Hopefully this is a better explanation for the version selector.

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-05-22 15:36:53 -07:00
Jayvin Hernandez
60d7b22dca fix: ability to delete other users images (#407)
* fix: Worst, but minimally working, fix so other users do not delete each other's files.

* fix: include previous fix for PATCH

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-05-22 15:36:19 -07:00
Jayvin Hernandez
d111b0811f fix: add a debug log (#406) 2023-05-22 15:32:26 -07:00
NebulaBC
b46e7b8ba2 Fix branding oversight caused by 0a34b0c (#405) 2023-05-16 14:46:48 -07:00
diced
39a8d52353 feat: built-in robots.txt (#402) 2023-05-13 16:25:27 -07:00
diced
ec09458ad3 feat: allow full paths (#393) 2023-05-13 00:12:29 -07:00
Jayvin Hernandez
a7ad58b196 fix: embed links #390 (#403)
* fix: Use raw route for embedding images.

* fix: there was already a raw link passed 😔
2023-05-12 23:14:59 -07:00
Jayvin Hernandez
1ddd351242 fix: things (#401)
* fix: use relative path for volumes

* fix: null check oauth config

* fix: attempt refresh if error is on /dashboard

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-05-10 22:39:08 -07:00
Derock
24b06c76fb feat: server-side sorting (#366)
Co-authored-by: Jayvin Hernandez <gogojayvin923@gmail.com>
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-05-10 22:32:13 -07:00
Dane
0a34b0cc21 feat: bypass local login (#373)
* adding option to bypass local login

* oops

* fix: add descriptive title

---------

Co-authored-by: Jayvin Hernandez <gogojayvin923@gmail.com>
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-05-06 11:04:52 -07:00
diced
ce26a414ac fix: update reference (#392) 2023-05-06 10:41:46 -07:00
diced
f71aab2cde fix: body size limit for pfp (#389) 2023-05-06 10:37:38 -07:00
diced
5f76e9d383 refactor: copy errors removed (#344) 2023-05-06 10:36:08 -07:00
diced
4a46f15833 fix: ext finding (#384) 2023-04-30 15:41:27 -07:00
diced
d6ce64ae21 fix: go back one page (#371) 2023-04-30 15:31:19 -07:00
Jayvin Hernandez
7cbf828f3b fix: properly type the relation field for OAuth (#370)
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-04-28 20:51:34 -07:00
Jayvin Hernandez
3ff215366a fix: a lot of things (#386)
* @diced forgor

* check if proper id

* fix(?): await datasource's get

* fix (diced/zipline#350): Return size 0 for not found
2023-04-28 20:32:51 -07:00
IThundxr
d238e24f62 feat: Add check to prevent favorited files from being deleted (#369)
* additions

* add proper lock system

* migreation

* Revert "migreation"

This reverts commit 4058146c28.

* remove that

* get rid of bad code

---------

Co-authored-by: Jayvin Hernandez <gogojayvin923@gmail.com>
2023-04-12 16:59:30 -07:00
Jayvin Hernandez
fd2746c2d0 fix: clearing (#367)
+ added convenient clear-temp script, no flags yet
2023-04-11 18:37:38 -07:00
Jayvin Hernandez
61b2eff6a4 fix: #364
* some fixes for diced/zipline-docs#50

* appropriately changed items

* tight fit for a selector
2023-04-06 20:02:07 -07:00
Jayvin Hernandez
89a28bf50b fix: query-size (#363)
* feat: add flags for querying & delete option

* return 0 for no file

* include size
2023-04-05 20:25:19 -07:00
Jayvin Hernandez
5ded128263 fix: user uuid (#355)
* fix: user uuid is used instead of user id for its uniqueness

* fix: use cuid instead & exclude from parser

* fix: apply new foreign key constraints to existing data

* fix: migration partly done

* not-fix: General form of migration achieved, still broken

* fix: migrate and use db's uuid function for existing users

* fix: Proper not nulling!

* fix: #354

* fix: migration & use uuid instead

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
Co-authored-by: diced <pranaco2@gmail.com>
2023-04-04 20:07:41 -07:00
dicedtomato
eedeb89c7d feat: offloaded chunked uploads (#356)
* feat: offloaded chunked uploads

* fix: use temp_directory instead of tmpdir()

* feat: CHUNKS_ENABLED config
2023-04-03 22:42:27 -07:00
Jayvin Hernandez
bf40fa9cd2 feat: many things (#351)
* remove source from final image

* move check state to ClearStorage

* use inspect for fancy colors

* newlines are now possible! yay!

* Catch user's leave if uploading

* feat?: Temp directory can be specified by the user.
Default is /tmp/zipline (or os equivalent)

* fix: ignore onDash config, use only ?compress query

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-03-31 22:25:00 -07:00
diced
bc58c1b56e fix: milestone again again again again again again 2023-03-31 22:12:13 -07:00
diced
c57a6e1700 fix: milestone again again again again again 2023-03-31 22:07:17 -07:00
diced
8649a489d8 fix: milestone again again again again 2023-03-31 22:05:59 -07:00
diced
40f29907c7 fix: milestone again again again 2023-03-31 21:55:26 -07:00
diced
34005ece43 fix: milestone again again 2023-03-31 21:53:30 -07:00
diced
8e6fc1e8a3 fix: milestone again 2023-03-31 21:49:50 -07:00
diced
065f44b145 fix: milestone 2023-03-31 21:41:19 -07:00
diced
e5a07f568d fix: update milestone action 2023-03-27 16:48:56 -07:00
dicedtomato
a728d71da1 Merge branch '3.x' into trunk 2023-03-26 20:46:00 -07:00
diced
91e468791e feat(3.7.0): version 2023-03-26 20:45:01 -07:00
dicedtomato
169a2ea562 Revert "Release 3.7.0 (#328)" (#347)
This reverts commit f9060f8ae7.
2023-03-26 20:40:41 -07:00
dicedtomato
f9060f8ae7 Release 3.7.0 (#328)
* fix: oauthId optional

* fix: remove optional

* hotfix: make oauthid optional (#249)

* hotfix: fallback oauth find (#250)

* fix: add a forgotten ? to schema

* fix: catch null at other places (#252)

* fix: forgor (#253)

* Fix root url & uploader stuff (#254)

* fix: uploader route as root won't be broken

* fix: fix broken url route for when on root

* fix: catch hopefully the most of the edge cases (#251)

* fix: catch hopefully the most of the edge cases

* fix: invite only, fools

* feat: tsup, small fixes

* fix: #264

* fix: urls handle empty strings

* fix: remove esbuild

* fix: do not mutate res #266

* feat: new embed method

* fix: overwrite tmp ss flameshot

* fix: overrides for uploading

* refactor: chart.js -> recharts

* feat: download query on /r/

* fix: better icons on file vie2

* feat: ability to generate url shorten config

* fix: sxcu name

* fix: react hooks error

* feat: ability to insert tabs on Tab keypress

* feat: overhaul image upload

* fix: clean

* fix: group icons vertically

* fix: embeds not showing up

* fix: docker stuff

* feat(3.7.0-rc1): version

* fix: cors for files (#257)

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>

* refactor: many columns/tables in prisma

* feat: keep original name #247

* fix: ability to gen with original-name

* fix: type error

* fix: no name on dashboard

* feat(v3.7.0-rc2): version

* fix: sharex DestinationType

* fix: ensureDatabaseExists args

* fix: sharex config

* fix: #277 #272

* fix: 🐛 Add Menu component as parent

* refactor: popover -> menu

Co-authored-by: IceToast <>
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>

* fix: add a "skip" for fresh db's (#274)

* fix: add a "skip" for fresh db's

* fix: trimming

* fix: elevate logging!

* fix: allow more variables on view

* fix: optimize docker image

* fix:  root url for upload and shorten (#255)

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>

* fix: /app -> /zipline

* feat(v3.7.0-rc3): folders for files

* fix: use `name` instead of `file` (#281)

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>

* feat: search+create for folder select (#283)

* feat?: Search for the folder to add.
Also you can create a folder right from the file, rather than being redirected.

* woops wrong import

* fix: return null for no string in parser (#285)

* feat: use ENTRYPOINT in docker (#286)

* :3

* Update Dockerfile

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>

* Update Dockerfile

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>

* Update Dockerfile

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>

* test

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>

* fix: set password to actual text value

* fix: url encode password query

* fix: entrypoint executable (#289)

* feat: override domain header

* fix: random domains

* feat: better version checking

* feat: public folders

* fix: dates #278

* feat: devcontainers for codespaces, etc.

* experiment with devcontainer.json

* introduce a docker-compose for devcontainer

* Devcontainers!

* version pop

* Port labeling and a complimentary env variable

* see it to believe it

* Update .devcontainer/devcontainer.json

* Update .devcontainer/devcontainer.json

* Update .devcontainer/docker-compose.yml

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>

* fix: spaces and route fixes (#294)

* fix: spaces and route fixes

* fix: shorten url response

* feat: better version checking

* fix: use special characters should work

If it doesn't, better call saul

* save that extra byte

* fix: returning protocol again in domain

unrelated to this pr but whatever

* fix: above ^

* Rename shorten.tsv to shorten.ts

---------

Co-authored-by: diced <pranaco2@gmail.com>
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>

* fix: #296

* fix: show files per user (#299)

* feat: clearing orphaned files (#303)

* fix: default public folder (docker)

* feat: seperate discord webhooks (shorten/upload) (#260)

* fix: title for folders

* fix: clipboard & 2fa improvements

A workaround that shows the content that would have been copied if `navigator.clipboard` is unavailable for whatever reason.

2FA input autofocuses & submits on enter.

* fix: revamp uploaded file modal

* fix: revamp mobile ui

* feat: more functionality within files table

* feat: clear zero byte files script

* feat: logger improvements
- Timestamp is gray
- removed colorette dependency
- introduction of LOGGER_FILTERS

* chore: update deps

* feat(v3.7.0-rc4): version

* fix: show warning when password protect

* fix: fix (#310)

* Muted audio by default!

* Code renderin'

* not but still decently standard files being viewable

* reserved routes

* Update validateConfig.ts

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>

* feat: file size (#308)

* feat: baseline support for file sizes

* feat: script to add file sizes

* fix: #311

* chore: update to mantine@6

* refactor: remove old File.tsx

* feat: initial move to mantine v6

* feat: use api option

* remove: useless size modifier

* fix: user button

* feat: use pininput for 2fa

* fix: breaking changes in migrating mantine v6

---------

Co-authored-by: TacticalCoderJay <gogojayvin923@gmail.com>

* feat: add size to datatable

* fix: null on non originalName

* fix: allow download query on non raw

* fix: undef file

* fix: spacingg between count_by_user

* feat: new ui for shortened urls

* fix: spacing within appshell/paper

* feat: new login page

* feat: reorganize menu

* feat: keyboard spotlight

* feat: tabler icons

* fix: remove feather import

* fix: update 2fa enabled appropriately & delete files (#315)

* fix: update 2fa enabled appropriately

* fix: a proper delete

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>

* feat(v3.7.0-rc5): version

* feat: add feature request "contact_link"

* feat: multiple stuffs

* feat: gfycat url #322

* feat: gfycat attribution

* feat(3.7.0-rc6): version

* fix: type cast

* feat: list view for urls, invites, users: #302

* refactor: docker-compose -> docker compose

* fix: open folder in new tab

* fix: save list-view setting to localStorage

* fix: Bug: URLs list view #330

* fix: #332

* fix: #331

* fix: #333

* feat: link to view gallery (icon)

* fix: clean up Anchors

* refactor: new eslint changes

* fix: fine tune devcontainer (#329)

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>

* fix: FileModal scrollbars

* fix: dynamically import katex

* fix: remove rogue console.log

* fix: open folder onRowClick

* fix: filter on usePaginatedFiles

* fix: icon sizes

* fix: paste listener

* feat(actions): auto-assign milestone

* feat(v3.7.0-rc7): version

* fix: #339

* fix: resetting avatars

* feat: new icons / oauth icons changed

* feat: UPLOADER_ASSUME_MIMETYPES (#337)

* fix: any instance of #342

* fix: any instance of #345

* fix: make tables take entire vh

* chore: update deps

* fix: add bigger sizeLimit

* fix: token exposed on view/[id]

---------

Co-authored-by: Jayvin Hernandez <gogojayvin923@gmail.com>
Co-authored-by: IceToast <54889359+IceToast@users.noreply.github.com>
Co-authored-by: IThundxr <harshdhaliwal9767@gmail.com>
Co-authored-by: IThundxr <contact@ithundxr.dev>
2023-03-26 20:40:01 -07:00
diced
d379bf8b1c fix: token exposed on view/[id] 2023-03-26 12:14:41 -07:00
diced
67b71ceffe fix: add bigger sizeLimit 2023-03-26 00:17:59 -07:00
diced
eb6929b889 chore: update deps 2023-03-26 00:03:10 -07:00
diced
d7299f8220 fix: make tables take entire vh 2023-03-25 23:39:16 -07:00
diced
1ed267ad94 fix: any instance of #345 2023-03-25 23:36:16 -07:00
diced
40a0cce3e8 fix: any instance of #342 2023-03-25 23:33:37 -07:00
diced
556aafaad3 feat: UPLOADER_ASSUME_MIMETYPES (#337) 2023-03-24 17:57:56 -07:00
diced
fdc7901eff feat: new icons / oauth icons changed 2023-03-24 17:56:53 -07:00
diced
9632399f5d fix: resetting avatars 2023-03-24 17:24:15 -07:00
diced
cc8a5411ab fix: #339 2023-03-24 17:20:33 -07:00
diced
12bb804e6a feat(v3.7.0-rc7): version 2023-03-22 20:27:52 -07:00
diced
3a27f31a03 feat(actions): auto-assign milestone 2023-03-22 19:41:06 -07:00
diced
37e7ad840c fix: paste listener 2023-03-22 19:36:26 -07:00
diced
c57a1ea326 fix: icon sizes 2023-03-21 20:06:46 -07:00
diced
12d5d5f08f fix: filter on usePaginatedFiles 2023-03-21 19:57:16 -07:00
diced
e7cf44e8e9 fix: open folder onRowClick 2023-03-21 19:53:59 -07:00
diced
a81f797266 fix: remove rogue console.log 2023-03-21 19:51:02 -07:00
diced
6ada79017a fix: dynamically import katex 2023-03-21 19:46:13 -07:00
diced
bdf34bbbbf fix: FileModal scrollbars 2023-03-21 19:31:45 -07:00
Jayvin Hernandez
c0d1b3d887 fix: fine tune devcontainer (#329)
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-03-21 18:01:02 -07:00
diced
1b505d463c refactor: new eslint changes 2023-03-21 17:53:22 -07:00
diced
25606a80ec fix: clean up Anchors 2023-03-21 17:09:50 -07:00
diced
8b540bff62 feat: link to view gallery (icon) 2023-03-21 16:36:47 -07:00
diced
8a2064e09d fix: #333 2023-03-21 16:30:01 -07:00
diced
1f0fb32b9b fix: #331 2023-03-20 22:50:28 -07:00
diced
3cbc345c00 fix: #332 2023-03-20 22:49:24 -07:00
diced
3c66c18c77 fix: Bug: URLs list view #330 2023-03-20 22:37:30 -07:00
diced
bcc816ea55 fix: save list-view setting to localStorage 2023-03-20 22:36:10 -07:00
diced
eb2713bc23 fix: open folder in new tab 2023-03-20 22:25:56 -07:00
diced
bcd68ae98b refactor: docker-compose -> docker compose 2023-03-19 16:48:08 -07:00
diced
d1a486ac1f feat: list view for urls, invites, users: #302 2023-03-19 16:44:04 -07:00
diced
0d36f5f091 fix: type cast 2023-03-18 21:57:41 -07:00
diced
3d5cdf50e6 feat(3.7.0-rc6): version 2023-03-18 21:54:20 -07:00
diced
1e81822c11 feat: gfycat attribution 2023-03-18 21:52:14 -07:00
diced
f8cd847588 feat: gfycat url #322 2023-03-18 21:48:19 -07:00
Jayvin Hernandez
5b9b454330 feat: multiple stuffs 2023-03-18 20:52:04 -07:00
dicedtomato
9c5b3f60d5 feat: add feature request "contact_link" 2023-03-09 20:51:07 -08:00
diced
d83c255382 feat(v3.7.0-rc5): version 2023-03-04 22:08:09 -08:00
Jayvin Hernandez
656b900256 fix: update 2fa enabled appropriately & delete files (#315)
* fix: update 2fa enabled appropriately

* fix: a proper delete

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-03-04 22:07:29 -08:00
diced
a16b516163 fix: remove feather import 2023-03-04 21:56:47 -08:00
diced
6d8e66478c feat: tabler icons 2023-03-04 21:51:58 -08:00
diced
4428555762 feat: keyboard spotlight 2023-03-04 19:57:09 -08:00
diced
463e91c3bd feat: reorganize menu 2023-03-04 18:48:05 -08:00
diced
1e37f06ab6 feat: new login page 2023-03-04 18:33:30 -08:00
diced
3af3ba69f5 fix: spacing within appshell/paper 2023-03-04 18:11:11 -08:00
diced
0adc07ac38 feat: new ui for shortened urls 2023-03-04 18:04:22 -08:00
diced
4fe4faa202 fix: spacingg between count_by_user 2023-03-04 17:58:35 -08:00
diced
4912a872e0 fix: undef file 2023-03-04 17:51:40 -08:00
diced
ac05d82e3a fix: allow download query on non raw 2023-03-04 17:50:14 -08:00
diced
6583f1114c fix: null on non originalName 2023-03-04 17:47:40 -08:00
diced
e2673fa9e1 feat: add size to datatable 2023-03-04 17:20:49 -08:00
dicedtomato
bc4b528ac6 chore: update to mantine@6
* refactor: remove old File.tsx

* feat: initial move to mantine v6

* feat: use api option

* remove: useless size modifier

* fix: user button

* feat: use pininput for 2fa

* fix: breaking changes in migrating mantine v6

---------

Co-authored-by: TacticalCoderJay <gogojayvin923@gmail.com>
2023-03-04 17:08:43 -08:00
dicedtomato
986858345e fix: #311 2023-03-04 04:52:00 +00:00
dicedtomato
912e439645 feat: file size (#308)
* feat: baseline support for file sizes

* feat: script to add file sizes
2023-03-03 20:40:28 -08:00
Jayvin Hernandez
8e44b71614 fix: fix (#310)
* Muted audio by default!

* Code renderin'

* not but still decently standard files being viewable

* reserved routes

* Update validateConfig.ts

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-03-03 20:19:19 -08:00
dicedtomato
11bca28ef5 fix: show warning when password protect 2023-03-04 04:15:24 +00:00
dicedtomato
4ef0c6021a feat(v3.7.0-rc4): version 2023-02-27 03:46:50 +00:00
dicedtomato
4fbbd58ae9 chore: update deps 2023-02-27 03:46:27 +00:00
dicedtomato
81dea6cf90 feat: logger improvements
- Timestamp is gray
- removed colorette dependency
- introduction of LOGGER_FILTERS
2023-02-27 01:54:37 +00:00
dicedtomato
9b57fb280b feat: clear zero byte files script 2023-02-27 01:52:39 +00:00
dicedtomato
e804d0b31e feat: more functionality within files table 2023-02-27 01:52:22 +00:00
dicedtomato
76845fc7e4 fix: revamp mobile ui 2023-02-26 20:45:20 +00:00
dicedtomato
decd7f7918 fix: revamp uploaded file modal 2023-02-26 20:20:36 +00:00
Jayvin Hernandez
8c5ff4f230 fix: clipboard & 2fa improvements
A workaround that shows the content that would have been copied if `navigator.clipboard` is unavailable for whatever reason.

2FA input autofocuses & submits on enter.
2023-02-26 11:33:57 -08:00
dicedtomato
0848702f65 fix: title for folders 2023-02-26 04:57:44 +00:00
Jayvin Hernandez
5379374135 feat: seperate discord webhooks (shorten/upload) (#260) 2023-02-25 20:47:14 -08:00
Jayvin Hernandez
b7772128d7 fix: default public folder (docker) 2023-02-25 20:36:05 -08:00
Jayvin Hernandez
95a1c7f92c feat: clearing orphaned files (#303) 2023-02-25 20:35:08 -08:00
Jayvin Hernandez
2d69cd580a fix: show files per user (#299) 2023-02-23 21:33:12 -08:00
dicedtomato
34552926d1 fix: #296 2023-02-24 00:18:03 +00:00
Jayvin Hernandez
739f584921 fix: spaces and route fixes (#294)
* fix: spaces and route fixes

* fix: shorten url response

* feat: better version checking

* fix: use special characters should work

If it doesn't, better call saul

* save that extra byte

* fix: returning protocol again in domain

unrelated to this pr but whatever

* fix: above ^

* Rename shorten.tsv to shorten.ts

---------

Co-authored-by: diced <pranaco2@gmail.com>
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-02-23 16:16:11 -08:00
Jayvin Hernandez
04d8b6421a feat: devcontainers for codespaces, etc.
* experiment with devcontainer.json

* introduce a docker-compose for devcontainer

* Devcontainers!

* version pop

* Port labeling and a complimentary env variable

* see it to believe it

* Update .devcontainer/devcontainer.json

* Update .devcontainer/devcontainer.json

* Update .devcontainer/docker-compose.yml

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-02-23 16:00:59 -08:00
diced
fdcd1f3d28 fix: dates #278 2023-02-23 14:42:39 -08:00
diced
fc02dc02e8 feat: public folders 2023-02-23 14:37:22 -08:00
diced
6955d83b0c feat: better version checking 2023-02-20 23:17:04 -08:00
diced
1b3d3a867b fix: random domains 2023-02-18 14:08:49 -08:00
diced
83718d7b31 feat: override domain header 2023-02-18 11:19:50 -08:00
IThundxr
e80627a3c3 fix: entrypoint executable (#289) 2023-02-18 10:02:40 -08:00
diced
e1003d4bb6 fix: url encode password query 2023-02-17 19:45:04 -08:00
diced
2ef4a52be0 fix: set password to actual text value 2023-02-17 19:44:51 -08:00
IThundxr
93a63d3714 feat: use ENTRYPOINT in docker (#286)
* :3

* Update Dockerfile

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>

* Update Dockerfile

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>

* Update Dockerfile

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>

* test

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-02-17 19:09:50 -08:00
Jayvin Hernandez
a8d9d98cf2 fix: return null for no string in parser (#285) 2023-02-16 16:47:07 -08:00
Jayvin Hernandez
d70ddd1f53 feat: search+create for folder select (#283)
* feat?: Search for the folder to add.
Also you can create a folder right from the file, rather than being redirected.

* woops wrong import
2023-02-13 19:37:47 -08:00
Jayvin Hernandez
283c7c5a26 fix: use name instead of file (#281)
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-02-10 22:47:06 -08:00
diced
fb5f50d5bd feat(v3.7.0-rc3): folders for files 2023-02-10 22:32:57 -08:00
diced
06e84b41aa fix: /app -> /zipline 2023-01-28 10:28:29 -08:00
Jayvin Hernandez
e3f262322a fix: root url for upload and shorten (#255)
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-01-26 20:06:30 -08:00
diced
70c2fa8ef4 fix: optimize docker image 2023-01-26 15:58:22 -08:00
diced
9f534e18c8 fix: allow more variables on view 2023-01-26 15:58:06 -08:00
Jayvin Hernandez
55bd72aef8 fix: add a "skip" for fresh db's (#274)
* fix: add a "skip" for fresh db's

* fix: trimming

* fix: elevate logging!
2023-01-26 12:46:10 -08:00
IceToast
c1a23faf1f fix: #277 #272
* fix: 🐛 Add Menu component as parent

* refactor: popover -> menu

Co-authored-by: IceToast <>
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-01-25 17:43:16 -08:00
dicedtomato
3588c297f8 fix: sharex config 2023-01-19 04:44:37 +00:00
diced
04d03cbc8f fix: ensureDatabaseExists args 2023-01-18 09:25:54 -08:00
diced
4e27efb6a1 fix: sharex DestinationType 2023-01-18 09:05:12 -08:00
diced
59b3e5bb24 feat(v3.7.0-rc2): version 2023-01-15 21:09:51 -08:00
diced
d8eee3d81a fix: no name on dashboard 2023-01-15 21:07:11 -08:00
diced
c8926682b2 fix: type error 2023-01-15 16:58:26 -08:00
diced
9117a9d779 fix: ability to gen with original-name 2023-01-15 14:05:37 -08:00
diced
4ea1775f2c feat: keep original name #247 2023-01-15 13:57:28 -08:00
diced
a8020ecebe refactor: many columns/tables in prisma 2023-01-15 13:39:07 -08:00
Jayvin Hernandez
2ace076fce fix: cors for files (#257)
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2023-01-15 11:26:30 -08:00
diced
45e897d475 feat(3.7.0-rc1): version 2023-01-14 15:27:21 -08:00
diced
98676f0573 fix: docker stuff 2023-01-14 15:25:36 -08:00
diced
c966ab9a52 fix: embeds not showing up 2023-01-14 13:50:56 -08:00
diced
ebaf11ad10 fix: group icons vertically 2023-01-14 13:27:23 -08:00
diced
19c7ba03c6 fix: clean 2023-01-14 13:20:04 -08:00
diced
894b5c5c6c feat: overhaul image upload 2023-01-14 12:04:30 -08:00
diced
516e93cee2 feat: ability to insert tabs on Tab keypress 2023-01-14 11:27:59 -08:00
diced
cc0ffc6e60 fix: react hooks error 2023-01-14 11:21:56 -08:00
diced
a97ace6e73 fix: sxcu name 2023-01-14 10:30:24 -08:00
diced
6d49463dad feat: ability to generate url shorten config 2023-01-14 10:25:54 -08:00
diced
81e6e4e5f2 fix: better icons on file vie2 2023-01-13 19:40:15 -08:00
diced
2adb355183 feat: download query on /r/ 2023-01-13 17:28:38 -08:00
diced
5e6c53432b refactor: chart.js -> recharts 2023-01-13 17:20:40 -08:00
diced
873f77bc43 fix: overrides for uploading 2023-01-12 20:17:25 -08:00
diced
9bf098a93a fix: overwrite tmp ss flameshot 2023-01-11 21:44:24 -08:00
diced
388713a3c6 feat: new embed method 2023-01-11 21:33:01 -08:00
diced
e94dd58542 fix: do not mutate res #266 2023-01-10 21:49:59 -08:00
diced
d985a1c588 fix: remove esbuild 2023-01-06 15:08:18 -08:00
diced
dbac6e8918 fix: urls handle empty strings 2023-01-06 15:06:34 -08:00
diced
a481c0ee5e fix: #264 2023-01-06 15:04:43 -08:00
diced
eef6fdaeb3 feat: tsup, small fixes 2023-01-06 14:45:48 -08:00
Jayvin Hernandez
b8b1a5bba6 fix: catch hopefully the most of the edge cases (#251)
* fix: catch hopefully the most of the edge cases

* fix: invite only, fools
2022-12-29 20:39:32 -08:00
Jayvin Hernandez
f06f52fce7 Fix root url & uploader stuff (#254)
* fix: uploader route as root won't be broken

* fix: fix broken url route for when on root
2022-12-18 17:29:50 -08:00
Jayvin Hernandez
4a332bb77b fix: forgor (#253) 2022-12-18 16:07:38 -08:00
Jayvin Hernandez
eb1b202566 fix: catch null at other places (#252) 2022-12-18 15:05:54 -08:00
diced
658f3a1a09 fix: add a forgotten ? to schema 2022-12-17 14:12:44 -08:00
Jayvin Hernandez
55eba480ac hotfix: fallback oauth find (#250) 2022-12-17 13:18:15 -08:00
Jayvin Hernandez
bbeea5b0ec hotfix: make oauthid optional (#249) 2022-12-17 09:37:29 -08:00
diced
ad454a94ef fix: remove optional 2022-12-17 09:33:07 -08:00
diced
268215ff5f fix: oauthId optional 2022-12-17 09:06:00 -08:00
diced
4e70daa4d8 feat(v3.6.4): version 2022-12-15 20:13:45 -08:00
diced
bb28f49cf5 feat: default avatar stuffs 2022-12-15 20:09:02 -08:00
diced
d85211a145 feat: better nav bar stuff 2022-12-15 20:09:02 -08:00
diced
a7291d374d fix: favorite pagination num 2022-12-15 20:09:02 -08:00
Jayvin Hernandez
5c9b558ac2 chore: update the readme (#246)
feature requests are now discussion threads instead of issues

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2022-12-15 18:09:36 -08:00
diced
36ede22d45 fix: readme sheilds.io images 2022-12-15 18:02:10 -08:00
diced
6528ec4056 fix: add default exit transition to modals 2022-12-14 22:46:41 -08:00
diced
56ee494c7d fix: add wayland instructions in flameshot builder 2022-12-14 22:45:10 -08:00
diced
b21995a0b9 fix: cleanup old methods from /api/user/files 2022-12-14 22:18:50 -08:00
diced
3c00575ecd feat: new system for paged files 2022-12-13 23:32:57 -08:00
diced
27ccbcb54a chore: pg latest -> pg 15 2022-12-13 22:26:50 -08:00
diced
fecbf394c1 fix: remove comments 2022-12-11 15:37:59 -08:00
diced
91341e2d21 feat: new variables parser 2022-12-11 15:30:19 -08:00
TacticalCoderJay
6349503b00 feat: clear storage (#244) (#239)
* - fix: use oauth's user id instead of username
 - feat: add login only config for oauth

* Addresses tomato's concerns

* fix: catch same account on different user

* Add storage cleaning

Co-authored-by: dicedtomato <diced@users.noreply.github.com>

* Update src/components/pages/Manage/index.tsx

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>

* Update src/components/pages/Manage/index.tsx

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>

Co-authored-by: dicedtomato <diced@users.noreply.github.com>
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2022-12-10 15:00:39 -08:00
diced
58e8c103b7 fix: change CORE_HTTPS To CORE_RETURN_HTTPS in compose file 2022-12-10 14:24:34 -08:00
diced
5d115afa71 feat: update deps & fix stuff 2022-12-10 14:19:53 -08:00
diced
d8b308a18c fix: bind 2022-12-09 19:37:40 -08:00
diced
76267c00d5 fix: attempt to fix #243 2022-12-09 19:31:35 -08:00
diced
9648856052 chore: update prisma-binaries 2022-12-09 18:09:58 -08:00
diced
d87e465a8e fix: undefined 2022-12-08 18:53:35 -08:00
diced
2c07d6719e feat: save showNonMedia checkbox value 2022-12-08 18:50:00 -08:00
diced
4c633eb60d fix: clean up 2022-12-07 23:11:19 -08:00
diced
ba6580e4ef fix: route not found for nextjs api routes 2022-12-07 23:10:43 -08:00
diced
c21d8f837e feat: built-in ssl support
- CORE_HTTPS is now CORE_RETURN_HTTPS
- SSL_(KEY/CERT/ALLOW_HTTP1)
2022-12-07 19:40:54 -08:00
diced
eadfa09570 refactor: migrate to fastify
- (maybe) faster http server
- easy to develop on
2022-12-07 19:21:26 -08:00
TacticalCoderJay
ea1a0b7fc8 fix: new oauth stuff (#240)
* - fix: use oauth's user id instead of username
 - feat: add login only config for oauth

* Addresses tomato's concerns

* fix: catch same account on different user
2022-12-06 21:40:13 -08:00
diced
9f797613d2 fix: render in files & fix typos 2022-12-06 17:19:02 -08:00
diced
b728ff33ec fix: delete URLs after serving 2022-12-06 16:35:38 -08:00
diced
7dc036c6e4 fix: order urls by desc 2022-12-06 16:30:47 -08:00
diced
78135aac02 fix: dynamically import prism languages 2022-12-05 19:57:14 -08:00
diced
950018673f feat: render tex (katex) and markdown 2022-12-05 18:16:31 -08:00
diced
cfdcf05135 feat: ability to use / for URLS_ROUTE 2022-12-03 14:31:13 -08:00
diced
ace474eb2c feat(v3.6.3): version 2022-12-03 08:37:37 -08:00
diced
285ed8d56e fix: actually fix recursive thing 2022-12-03 08:02:16 -08:00
diced
738e25feda fix: exiftool not working on docker 2022-12-02 17:35:47 -08:00
diced
6d2d071293 fix: max call stack error 2022-12-02 08:37:13 -08:00
diced
725ce50608 feat(V3.6.2): version 2022-12-01 09:47:09 -08:00
diced
78e884e97e feat: default expiration/ttl (#237) 2022-12-01 09:42:16 -08:00
diced
cb123cb575 fix: formatting 2022-12-01 09:31:29 -08:00
diced
6f3081cb8e feat: headless mode 2022-12-01 09:27:14 -08:00
dicedtomato
231f734fd5 Update README.md 2022-11-28 20:47:24 -08:00
TacticalCoderJay
fce7325a24 fix: add onDelete to all relations (#236) 2022-11-28 20:39:20 -08:00
diced
2bec45411f feat: overhaul upload frontend 2022-11-28 19:58:21 -08:00
diced
577195b578 fix: serve favicon.ico always 2022-11-27 20:06:22 -08:00
diced
a402227c4f fix: custom placeholder 2022-11-27 19:55:14 -08:00
TacticalCoderJay
a75b790654 fix: allow root route & remove swift refs (#235) (#214)
* fix:
 - readd root route for uploads only
 - catch 1 edge case for root route (/dashboard)

* fix: spelt dashboard right

* fix: include the dot for the extension

* fix: remove any possible references of swift

* fix: missed a spot

* Update .env.local.example

Co-authored-by: Jonathan <axis@axis.moe>

* Update .env.local.example

* Update validateConfig.ts

* format

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
Co-authored-by: Jonathan <axis@axis.moe>
2022-11-27 18:20:29 -08:00
TacticalCoderJay
f07cbeac52 fix: small bug & no file ext (#234)
* fix: allow empty file extensions

* fix: Add a button to show non-media files

* fix: Looks better

* Update FilePagation.tsx

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2022-11-26 16:15:09 -08:00
diced
dcfcce7803 update readme with stuff 2022-11-26 14:33:42 -08:00
diced
659868181d feat: supabase datasource & remove swift 2022-11-25 14:30:18 -08:00
diced
d76e6444e0 fix: dumb cors headers 2022-11-24 14:34:24 -08:00
diced
0dbbf4840c fix: CORS not working because of auth headers 2022-11-24 14:17:46 -08:00
diced
1b6af9fc08 fix: OPTIONS being blocked 2022-11-24 10:35:06 -08:00
karlmanait
8e1541ea56 feat: add configuration for default upload format (#232)
* feat: add configuration for default upload format

* fix: change default back to original
2022-11-22 20:36:49 -08:00
diced
fd9908833a fix: link on files 2022-11-20 00:01:31 -08:00
diced
24f8300b2c fix: delete invites that expired or are used 2022-11-19 17:16:46 -08:00
diced
8d510f5d90 fix: typo 2022-11-19 17:05:15 -08:00
diced
6457680065 feat: exif metadata & remove gps 2022-11-19 13:58:14 -08:00
diced
3175911105 feat: totp 2022-11-17 22:13:23 -08:00
dicedtomato
00f26bdc75 fix: delete suggestion issues, use discussions 2022-11-17 16:04:08 -08:00
Winter
9db95bb772 fix: README spelling errors (#224) 2022-11-17 15:30:49 -08:00
diced
e1ba96784c feat(v3.6.1): version 2022-11-16 21:35:32 -08:00
diced
f67d1d41cb feat: bunch of stuff 2022-11-13 19:34:38 -08:00
diced
bb7367615d fix: remove extra administrator in set-user 2022-11-10 20:13:40 -08:00
diced
f8be8fb583 feat: new icons 2022-11-10 19:52:08 -08:00
diced
e00393936f fix: invites 3d (#218) 2022-11-10 19:37:23 -08:00
diced
3c782de64d fix: update views after serving (#213) 2022-11-10 19:37:23 -08:00
diced
678dc9ef6b fix: remove build:server on scripts 2022-11-10 19:37:23 -08:00
diced
67bb9cd4a5 feat: list-users & set-user script 2022-11-10 19:37:23 -08:00
diced
51cfb9062a fix: notifs disappear on large files (#219) 2022-11-10 19:37:23 -08:00
TacticalCoderJay
1ecf979721 fix: housekeeping (#215)
* chore: remove console.log

* chore: update error message to env file
2022-11-06 10:29:42 -08:00
diced
642b0fdc95 fix: await uploader middleware 2022-11-06 09:24:14 -08:00
Max
bc64d6886a fix: grammar (#212)
* Grammar fix

* Grammar fix, again

* Last commit

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2022-11-03 20:45:48 -07:00
diced
81399c59f7 fix: oauth 2022-11-03 20:42:43 -07:00
diced
69d10ef429 refactor: api 2022-11-03 20:40:47 -07:00
diced
3c616f4f6f fix: views increasing on /r 2022-11-02 09:22:01 -07:00
dicedtomato
988b61e459 fix: config.yml contact_links 2022-11-01 20:52:35 -07:00
TacticalCoderJay
3d4e0b8fc0 Include the discord server for a place to get help :D (#210)
* Create config.yml

* feat: Contact link w/ Discord!

* Update config.yml

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2022-11-01 20:50:19 -07:00
diced
564fcfca61 fix: crash when clicking on images 2022-11-01 18:25:51 -07:00
diced
709e1da768 fix: invites when user_registration false 2022-11-01 18:19:07 -07:00
diced
a1f281d8b4 feat(v3.6.0): version 2022-10-31 20:02:55 -07:00
diced
d2f3999cf1 fix: expires/expired text change 2022-10-31 16:43:12 -07:00
TacticalCoderJay
87fc9f2fb9 feat: v3.6.0-rc4 (#207)
* feat: oauth reform for potential improvements

* fix: update avatars with new pfp

* fix: remove redundant include

* feat: v3.6.0-rc4

Co-authored-by: dicedtomato <diced@users.noreply.github.com>

* fix: remove console log

Co-authored-by: dicedtomato <diced@users.noreply.github.com>
2022-10-30 21:42:39 -07:00
diced
8c9064fd93 fix: rework image serving 2022-10-29 22:43:42 -07:00
diced
561849ae5b feat: ability to link existing accounts to oauth 2022-10-29 20:02:54 -07:00
diced
0847802ce4 fix: remove console.log 2022-10-29 14:59:26 -07:00
diced
d5a8b3f1fb chore: update workflows node@18 2022-10-29 10:53:21 -07:00
diced
e6cebd8c46 fix: update node@18, fix views aggregation, force update stats 2022-10-29 10:52:35 -07:00
TacticalCoderJay
f2be036bac feat: issue template (#202)
* feat: new issue templates

* fix: unique ids

* fix: typo

* fix: tabbing

* Update bug.yml

* Update suggest.yml

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2022-10-29 09:56:39 -07:00
diced
f14448d40d fix: add id to version 2022-10-28 21:14:34 -07:00
diced
bf719808f2 fix: merge changes to release 2022-10-28 21:09:41 -07:00
diced
9dd82c91d7 fix: actions outputs maybe 2022-10-28 21:08:40 -07:00
diced
535f84064a fix: actions outputs 2022-10-28 21:05:44 -07:00
diced
0c0a55d766 fix: update actions/cache 2022-10-28 21:01:49 -07:00
diced
6e3ee29eb4 fix: upgrade checkout action 2022-10-28 21:01:02 -07:00
diced
6a7a5dc7a3 fix: migrate from save-state to env 2022-10-28 20:57:01 -07:00
diced
e78d2d79d0 feat: upgrade docker actions 2022-10-28 20:53:13 -07:00
diced
451027eaf3 feat: add cache to releawes 2022-10-28 20:44:43 -07:00
diced
e4491610fb feat: add trunk-(version) to tag & test cache 2022-10-28 20:41:39 -07:00
diced
f30e10f235 feat: try adding docker caching 2022-10-28 19:37:09 -07:00
diced
f9249b1380 feat: even more for URLs 2022-10-28 17:41:46 -07:00
diced
3df94526b0 feat: add more info to cards & relative time 2022-10-28 17:28:15 -07:00
diced
b30b7b1bd3 fix: #204 2022-10-28 16:47:16 -07:00
dicedtomato
a9defd67d6 feat: add screenshots to readme 2022-10-27 21:53:12 -07:00
diced
68d346e69d fix: stuff 2022-10-27 21:26:54 -07:00
diced
e2fd27cbba feat(3.6.0-rc3): version & bump deps 2022-10-27 21:09:14 -07:00
diced
4c0532006c fix: resolve multiple el in titles 2022-10-27 21:07:44 -07:00
diced
7ac574b230 fix: support .env file 2022-10-27 19:38:54 -07:00
diced
7eb855de8f feat: new file serving method & max views for files 2022-10-27 19:34:20 -07:00
diced
d5984f4141 chore: make things work on next 13 2022-10-26 18:20:56 -07:00
diced
b7c0c85639 chore: bump nextjs 2022-10-25 17:52:04 -07:00
diced
84ba166aea feat: file chunking for large uploads 2022-10-24 18:31:49 -07:00
diced
bd79858681 feat(3.6.0-rc2): version 2022-10-24 11:39:42 -07:00
diced
0f10fa3991 fix: uniform margins 2022-10-24 11:38:38 -07:00
diced
74b1799d21 feat: user registration without oauth 2022-10-24 11:28:06 -07:00
diced
4552643ff8 feat: more options for text uploads & password protect them 2022-10-24 11:10:32 -07:00
diced
d432b388f6 feat: preview text uploads 2022-10-24 10:57:13 -07:00
diced
a8475602c7 feat: add port config opt for s3 2022-10-23 12:33:04 -07:00
diced
f58d33af9e fix: recurse for entryPoints 2022-10-23 12:16:59 -07:00
diced
0150ea5e70 fix: spacing between main dashboard elements 2022-10-23 11:57:24 -07:00
diced
3bf43f1606 fix: maybe fix exports 2022-10-23 10:36:38 -07:00
diced
b8729a6ec7 fix: save imported files to datasource 2022-10-23 10:14:29 -07:00
diced
1f44aa7e85 fix: await on prisma.image.createMany 2022-10-23 10:09:48 -07:00
diced
2bd5352fc5 feat: import-dir script 2022-10-23 10:08:21 -07:00
diced
a90130e8bf feat(v3.6.0-rc1): small fixes 2022-10-22 23:42:52 -07:00
diced
642e8796f0 feat: oauth info in user dropdown 2022-10-22 16:10:31 -07:00
diced
615cbddc89 feat: ability to edit/delete users with master administrator 2022-10-22 14:50:53 -07:00
diced
4ef82bdff4 fix: prettier 2022-10-22 14:30:50 -07:00
diced
dafde04c2c fix: config validation for discord is null 2022-10-22 14:26:34 -07:00
diced
1be61b8d89 chore: update deps & tsx -> esbuild 2022-10-22 14:23:23 -07:00
diced
c3215c7425 fix: add oauth to readme 2022-10-19 19:49:25 -07:00
Jonathan
af0cd26ea0 feat: prettier run (#200)
* feat: prettier run

* fix: whatever that was

* chore: format more files

* chore: make format command better
2022-10-19 19:43:01 -07:00
Jonathan
cb7dacd089 perf: config validation improvements (#192)
* perf: improve config validation

* chore: remove extra space in package.json

* fix: actually update file

* fix: `datasource.local` not providing a default value

* fix: small oversight in readConfig & better error

Co-authored-by: diced <pranaco2@gmail.com>
2022-10-18 22:15:15 -07:00
TacticalCoderJay
8c04971094 fix: create -> save (edit user) (#199) 2022-10-18 20:19:40 -07:00
diced
3a4802f09a fix: checks for export & refresh button 2022-10-17 17:20:54 -07:00
TacticalCoderJay
d78db306c5 fix: use os.tmpdir instead of hardcoded /tmp (#198) 2022-10-17 17:05:38 -07:00
TacticalCoderJay
3f8790ece1 fix: only display exports that are your own (#197) 2022-10-17 16:48:01 -07:00
TacticalCoderJay
f9e6158144 hotfix: change text to adjusted limit (#196) 2022-10-17 07:59:33 -07:00
TacticalCoderJay
05de3fed15 feat: ability to create many invites (#194) (#183)
* feat: Create many invites added.

* Update src/pages/api/auth/invite.ts

Co-authored-by: Jonathan <axis@axis.moe>

* fix: Lowered limit.

Co-authored-by: Jonathan <axis@axis.moe>
2022-10-16 20:18:21 -07:00
TacticalCoderJay
38cba9cb39 fix: Follow proper linebreak style. (#191) 2022-10-16 20:10:52 -07:00
diced
a4af980e11 fix: password strength not showing up on invites (#186) 2022-10-16 14:32:27 -07:00
diced
940b844857 feat: admins can't edit/delete other admins 2022-10-16 14:12:44 -07:00
diced
41b766216e feat: naming & views on files #187 #181 2022-10-16 14:06:32 -07:00
Jonathan
402987baba fix(dashboard): error when fetching stats (#193)
Handles an edge case where stats.data is a 1 length array since there's no before data
2022-10-16 13:44:46 -07:00
Winter
3cb08c73d3 feat: add S3 SSL as an env variable (#188)
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2022-10-15 12:33:37 -07:00
Derock
4cb92a7257 fix: NaN on stat card (#179)
* fix: NaN % change

* ref: format

Co-authored-by: Jonathan <axis@axis.moe>

Co-authored-by: Jonathan <axis@axis.moe>
Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2022-10-15 12:22:57 -07:00
diced
a095768eae ref: change look of oauth 2022-10-13 21:47:56 -07:00
diced
1a5925d7e8 fix: add minWidth to user dropdown 2022-10-08 21:28:36 -07:00
diced
9147847710 fix: make line graph tooltips work everywhere 2022-10-08 21:24:05 -07:00
diced
05fe8bcaca fix: remove debug logs 2022-10-08 21:07:55 -07:00
diced
b0c3c6f45a feat: oauth sign up 2022-10-08 17:58:56 -07:00
diced
0f641aa852 fix: make last icon flat 2022-10-02 16:01:33 -07:00
diced
2651bbe50c fix: change readme 2022-10-02 16:01:05 -07:00
diced
d31371eb6c feat: configurable invites & disable_media_preview config 2022-10-02 15:39:59 -07:00
diced
ec0e7e5ec7 feat: edit users (admin-only) 2022-10-01 14:04:18 -07:00
diced
feb75a8a42 fix(config): add env for UPLOADER_DATE_FORMAT 2022-10-01 13:34:41 -07:00
diced
d4369d2503 refactor: redux -> recoil 2022-10-01 11:09:07 -07:00
diced
d236589644 fix: tidy up stuff 2022-10-01 11:09:07 -07:00
diced
8044b7f623 refactor: move clientUtils into utils/ 2022-10-01 11:09:07 -07:00
dicedtomato
9f0697dd34 feat: add contributing.md 2022-09-30 16:16:08 -07:00
diced
78a6f3122d fix: escape . in regexes 2022-09-28 20:45:50 -07:00
diced
b460da74dd refactor: change bool() -> boolean() 2022-09-28 20:30:24 -07:00
Wolfy0615
75a8bb7962 fix: change outdated url (#172)
* Fix outdated url

Updated to resolve merge conflicts

* Update index.tsx

Fix #2
2022-09-28 19:50:01 -07:00
diced
9ac876e30a feat: ability to view non-media views 2022-09-24 14:25:34 -07:00
diced
26cb4ea034 fix: placeholder and red buttons 2022-09-24 10:43:23 -07:00
diced
0d65ee1a32 feat: flameshot generator 2022-09-24 10:41:03 -07:00
Erik Bender
4a753376b7 feat: add password field in file upload ui (#169) 2022-09-24 10:14:36 -07:00
Derock
dc926e9f5a feat: overhaul a lot of stuff (#171)
* feat: ssr for /code/[id], fix: syntax highlighting

* feat: cache responses

* ref: eslint

* wip

* Create .gitattributes

* wip again

* redesign dashboard

* ref: use react-query for url
ref: break into components
feat: loading animation for delete
feat: no url image

* feat: use react-query mutation for files

* ref: update sizing on code input

* chore(deps): update mantine

* feat: overhaul stats page

* fix: incorrectly calculating stat % change

* fix: use latest data in stats per day

* feat: add validation on stats amount query string

* refactor: clean up imports & code

* fix: remove prettier (fixes eslint)

* ref: run eslint autofix

* ref: more eslint

* ref: replace undraw on homepage with react-feather

* refactor: remove tailwind & add responsiveness to stuff

* fix: colors on file placeholder

* fix: make actions work

* feat: new sharex configuration generator

Co-authored-by: diced <pranaco2@gmail.com>
2022-09-23 18:19:27 -07:00
diced
722372c7f6 fix: #173 2022-09-11 12:08:38 -07:00
diced
4589c6ee0a fix: #166 2022-09-05 15:06:07 -07:00
diced
67ff93e640 fix: remove useless webpack cofnig 2022-08-26 20:38:31 -07:00
diced
bd055d704b fix: domain duplication 2022-08-26 20:35:25 -07:00
diced
2e8bee931c feat: add a debug read-config script 2022-08-26 20:06:57 -07:00
diced
a454a4f4a8 feat: external links & bug fixes 2022-08-26 20:04:25 -07:00
diced
45541a3cdd feat: add version to appshell 2022-08-24 20:37:57 -07:00
diced
1d42d922bd feat: discord webhook notifs 2022-08-23 09:38:29 -07:00
diced
4f631fbd0e feat: more ways to expire 2022-08-21 22:24:56 -07:00
diced
e911db4c1a fix: image table on dashboard 2022-08-17 15:01:23 -07:00
diced
9b60147e11 feat(v3.5.0): version 2022-08-16 15:25:44 -07:00
diced
acd0cabdff feat: update prisma binaries 2022-08-16 15:24:09 -07:00
diced
d41f6058f7 feat: user avatars 2022-08-16 14:50:59 -07:00
diced
8f835eec4e feat: add image compression 2022-08-16 14:04:11 -07:00
diced
ecab525ffd fix: text & video embed 2022-08-15 20:55:46 -07:00
diced
7c887e8ec1 fix: vanities can be overwritten 2022-07-28 14:03:29 -07:00
diced
f3a23a528b feat: expiring images 2022-07-28 13:53:46 -07:00
diced
cdcb31130b feat: switch to tsx (typescript execute) 2022-07-28 11:30:14 -07:00
diced
3ea24ddf0c feat: switch to mantine v5 2022-07-28 11:03:22 -07:00
dicedtomato
12baadd563 fix: revert version 2022-07-15 21:29:44 +00:00
dicedtomato
f5ae36d4e7 feat: version 3.4.9 2022-07-15 21:28:27 +00:00
dicedtomato
04ca738fb1 feat: add more mimetypes! 2022-07-15 21:27:01 +00:00
dicedtomato
95e09e51e1 fix: add title to Layout 2022-07-15 17:34:32 +00:00
dicedtomato
2f0af385c7 feat: add content-length headers 2022-07-15 17:20:24 +00:00
dicedtomato
786e6d5799 feat: new configuration options 2022-07-14 03:05:16 +00:00
dicedtomato
61c5df750a feat: invitations to create accounts 2022-07-14 02:31:23 +00:00
dicedtomato
eb30afcb83 remove: meta config (will be added another day) 2022-07-13 16:32:56 +00:00
dicedtomato
cdf0f6e96c feat: versioned docker images 2022-07-13 04:32:52 +00:00
dicedtomato
54158c5dbe refactor: remove config file in favor for env variables 2022-07-13 02:50:25 +00:00
dicedtomato
56ff86db44 feat: revamp file gallery 2022-07-12 22:09:57 +00:00
dicedtomato
b7560c80aa fix: make dropzone larger 2022-07-10 05:43:19 +00:00
dicedtomato
03379943de fix: clean up upload components 2022-07-10 05:38:53 +00:00
dicedtomato
2376fd8968 feat: switch from radix-icons to feathericons 2022-07-10 00:46:15 +00:00
dicedtomato
2f90193d7e feat: add text uplading 2022-07-09 23:54:55 +00:00
dicedtomato
964199f8a9 fix(config): make s3/swift optional and not error out 2022-07-09 20:35:21 +00:00
dicedtomato
678ea20004 fix(docker): build 2022-07-08 02:57:31 +00:00
dicedtomato
ea27fd8a45 feat(3.4.8): fix bug where you can crash zipline 2022-07-08 02:52:19 +00:00
dicedtomato
38eef3f0ad feat(v3.4.7): version 2022-07-06 17:03:44 +00:00
dicedtomato
22615e9ce9 fix: build 2022-07-06 17:01:12 +00:00
dicedtomato
a999abfbf8 feat: a bunch of changes 2022-07-06 16:57:39 +00:00
dicedtomato
20c1d3ef08 Merge branch 'trunk' of https://github.com/diced/zipline into trunk 2022-06-26 17:58:14 +00:00
Adil Mohiuddin
b06c8e4918 fix: add link to xsel (#157) 2022-06-25 21:41:42 -07:00
dicedtomato
6edfdcefcc fix(s3): use smaller libraries 2022-06-25 17:07:19 +00:00
dicedtomato
10b145b006 fix(docker): use prebuilt binaries 2022-06-25 00:01:23 +00:00
dicedtomato
0ba9a9659d fix(docker): build prisma so it works on alpine arm64 2022-06-24 18:27:35 +00:00
cstef
2dfa1b6b14 feat: add Openstack Swift support (#154)
* Add Openstack support

* Fix datasource getting

* Restore example config + remove useless vscode dir

* Restore example config + remove useless vscode dir

* Add config.ts to the entryPoints list

* Fix indenting problems with switch-case

* Replace openstack-swift-client

* Add openstack to the config validator

* Rename Openstack to Swift

* Better error handling for swift

* More error handling

* Update Swift.ts

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2022-06-21 17:54:05 -07:00
dicedtomato
7a3f9f1fa4 fix: maybe fix action idk 2022-06-20 22:43:21 -07:00
diced
f276fdc6a0 feat(docker): remove arm docker stuff in favor of cross arch dockerfile 2022-06-20 22:29:33 -07:00
diced
7963bdd1e4 feat(v3.4.6): version & fixes 2022-06-20 17:40:36 -07:00
diced
195c57edc3 refactor(server): clean up server code 2022-06-20 17:09:52 -07:00
diced
4442c85dc1 fix(server): prisma migrations dont exit (high cpu) 2022-06-20 17:08:43 -07:00
diced
5bcac2a2b0 refactor(readme): more info 2022-06-20 15:07:15 -07:00
diced
5303b67d11 fix(pages): add blur to password modal 2022-06-20 14:35:26 -07:00
diced
af59e9abb8 fix(pages): videos supported on embeded uploads 2022-06-20 14:33:10 -07:00
diced
fb098c9147 feat(page): add preview on hover & progress bar 2022-06-20 14:12:57 -07:00
diced
739974bef4 refactor(config): move into directory 2022-06-20 10:55:43 -07:00
diced
d21e48a1a3 fix(api): improve ratelimits 2022-06-20 10:49:24 -07:00
diced
8fea0cbe77 refactor: clean up datasource stuff 2022-06-20 10:25:22 -07:00
diced
1e2b8efb13 feat(v3.4.5): version 2022-06-19 17:46:45 -07:00
diced
8495963094 feat(v3.4.5): exporting images and more stuff 2022-06-19 17:46:20 -07:00
diced
06d1c0bc3b fix(api): make delete user with images actually delete their images from the datasource 2022-06-19 17:26:52 -07:00
diced
5965c2e237 fix(config): extention -> extension 2022-06-19 16:44:55 -07:00
diced
fb34dfadb0 fix(config): make endpoint nullable 2022-06-18 13:47:59 -07:00
diced
13b0ac737b feat(datasource): s3 path styles 2022-06-18 13:39:12 -07:00
diced
300430b3ec Merge branch 'trunk' of github.com:diced/zipline into trunk 2022-06-18 12:38:42 -07:00
NebulaBC
cf6f154e6e fix: add env vars for s3 endpoint (#153) 2022-06-17 19:05:20 -07:00
diced
2ddf8c0cdb fix(api): password protected images wont show up on root 2022-06-17 15:35:29 -07:00
NebulaBC
2a402f77b5 feat(api): S3 endpoint support (#152)
* S3 endpoint support

Adding endpoint support to S3 allows for other S3-compatible uploaders to be used

* Fix formatting error
2022-06-17 14:29:34 -07:00
Han Cen
7b2c31658a feat(api): root uploader route (#150) 2022-06-17 14:20:21 -07:00
Han Cen
7a91a60af9 fix: fix build (#149) 2022-06-17 08:35:53 -07:00
diced
bfa6c70bf3 chore(deps): update stuff 2022-06-16 14:22:26 -07:00
Jonathan
73eff05180 feat: use yarn v3 (#136)
* feat: use yarn v3

* chore: bump yarn to 3.2.1
2022-06-06 16:38:15 -07:00
relaxtakenotes
74f3b3f13d fix: image width not being set properly (#143)
* Fix image width not being set properly

Sometimes it got set to 0 because the original image wasn't loaded yet.

* fix: eslint

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2022-06-04 22:18:07 -07:00
diced
181833d768 Merge branch 'trunk' of github.com:diced/zipline into trunk 2022-06-04 22:05:26 -07:00
diced
be9523304a feat(v3.4.4): fix many bugs and password protected uploads 2022-06-04 22:05:08 -07:00
dicedtomato
b26fef3ad4 fix(docker): add restart policy for postgres 2022-03-26 20:37:02 +00:00
diced
9f86674bbe fix: update security policy 2022-03-14 20:31:18 -07:00
diced
095e57a037 fix(actions): arm -> arm64 2022-03-14 20:22:39 -07:00
diced
66a8e3bb79 feat: arm docker-compose file 2022-03-13 20:05:41 -07:00
diced
473137abdf fix(actions): fix arm action path 2022-03-13 19:36:28 -07:00
diced
740f1605e7 fix(actions): maybe fix actions 2022-03-13 19:30:37 -07:00
diced
0922ec020e fix: revert to node 16 on actions 2022-03-13 19:27:32 -07:00
diced
dbe8291f55 fix(actions): maybe fix arm action 2022-03-13 19:26:33 -07:00
diced
9dcc16277e refactor(actions): update to v2 of build-push-action & push arm image 2022-03-13 19:25:11 -07:00
diced
aa611fa6ba feat(v3.4.3): cleanup, fix memory leak, arm support 2022-03-13 19:13:18 -07:00
diced
083040e300 feat(v3.4.2): random domain selection #129 2022-03-03 17:52:34 -08:00
diced
99e92e4594 feat(v3.4.1): datasource api, for S3 functionality 2022-03-02 22:04:56 -08:00
diced
870f6e88b1 fix(prisma): add removal of custom theme migration 2022-02-26 17:27:37 -08:00
dicedtomato
16d2014bfb feat(v3.4.0): switch from Material-UI to Mantine! (#127) 2022-02-26 17:19:02 -08:00
diced
4d9a22e82c fix(api): data not defined 2022-02-21 09:28:32 -08:00
diced
42d77e445b feat(v3.3.2): image formats 2022-02-21 09:27:10 -08:00
diced
6506846207 fix: cleanup 2022-02-21 09:26:26 -08:00
diced
2b9af0e0de feat(api): formats for uploaded images 2022-02-20 22:01:31 -08:00
diced
762d2927f7 Merge branch 'trunk' of github.com:diced/zipline into trunk 2022-02-19 20:17:53 -08:00
diced
d9561f3b12 feat(v3.3.1): bug fixes and new features 2022-02-19 20:17:02 -08:00
dicedtomato
dde24848d4 fix: domains in readme 2022-02-17 16:31:12 -08:00
diced
e786482902 fix: multiple issues & new features 2022-02-12 20:35:36 -08:00
diced
4e64922b70 feat(v3.3): release 3.3 2022-01-03 19:00:51 -08:00
diced
15042b16d1 feat(v3.3): ctrl+v to upload image 2022-01-03 19:00:20 -08:00
diced
5e4c4fc6c9 feat(v3.3): faster stats 2022-01-03 15:56:33 -08:00
diced
7194c53891 feat(v3.3): ratelimit 2022-01-03 15:17:47 -08:00
Nguyen Thanh Quang
7eff77ccc4 refactor(api): cors duplication (#109)
* refactor(api): cors duplication

* refactor(middleware): moved content-type setter to top
2021-11-27 15:00:18 -08:00
Nguyen Thanh Quang
1b78ffaa91 fix(prisma): make sure migrations are migrated in the first run (#105)
* fix(prisma): make sure migrations are migrated in the first run

* chore: removed redundant parentheses
2021-11-27 14:39:57 -08:00
dicedtomato
8e8bfd68d1 Update README.md 2021-11-23 18:31:26 -08:00
diced
b029505cdd feat(api): add cors 2021-11-04 17:09:18 -07:00
Kyle
c5c862bee3 fix: readme links (#104) 2021-10-03 11:42:27 -07:00
Nguyen Thanh Quang
3c38d008f1 fix(config): updated example config file (#103) 2021-10-03 11:41:50 -07:00
diced
dc52b00a00 feat(v3.2.5): update mui & embed vars 2021-10-02 20:16:23 -07:00
diced
b5d2e7040e fix: multi 1000 to expires 2021-09-25 18:03:06 -07:00
diced
5818440721 feat(pages): add create url 2021-09-25 18:00:00 -07:00
diced
f1c46da47d feat(pages): add urls page 2021-09-25 17:30:23 -07:00
diced
212c69d303 fix: add comma dangles 2021-09-25 09:39:51 -07:00
diced
9e4152e298 fix: github actions build 2021-09-24 20:41:26 -07:00
diced
307f023e47 fix: github actions build 2021-09-24 20:39:43 -07:00
diced
3451bd8762 feat(v3.2.4): url shortenning 2021-09-24 20:31:45 -07:00
diced
a9d0be8aae fix: revert arm stuff 2021-09-18 21:34:02 -07:00
diced
d83f720631 fix(actions): add custom prisma engines 2021-09-18 21:28:24 -07:00
diced
1f3d396296 fix(actions): make action use v2 2021-09-18 20:59:03 -07:00
diced
48f771f344 fix(actions): make action use v2 2021-09-18 20:42:47 -07:00
diced
555bc6aa26 fix(docker): make action target linux/arm64 2021-09-18 20:33:25 -07:00
diced
8bd0eaac1e fix(docker): make action target linux/arm64 2021-09-18 20:19:50 -07:00
diced
3280c77002 fix(docker): make action target linux/arm64 2021-09-18 20:18:04 -07:00
diced
b39743a53a fix(docker): make action target linux/arm64 2021-09-18 20:16:33 -07:00
diced
9a73da56e9 feat(docker): add arm64 compatible images 2021-09-18 20:10:22 -07:00
diced
c9b0d2664f feat(v3.2.3): new config validation 2021-09-17 21:38:24 -07:00
dicedtomato
6063c9efac Update README.md 2021-09-17 20:40:38 -07:00
diced
dd6f192d4a fix: many things 2021-09-17 20:39:20 -07:00
diced
d956f4ed3d fix(api): fix recent images showing other users images 2021-09-12 21:31:43 -07:00
diced
4728258750 feat: v3.2.2 new file management & viewing 2021-09-12 21:17:27 -07:00
diced
ece3e16459 fix(api): fixed being able to override user (#98) 2021-09-08 20:56:47 -07:00
Nguyen Thanh Quang
9208dbe2f3 fix(api): fixed being able to override user (#98)
* fix(api): fixed being able to override user

* Update index.ts
2021-09-08 20:56:10 -07:00
diced
636de18642 feat(pages): add recent images to dashboard 2021-09-06 15:58:01 -07:00
diced
ee48456291 fix(api): change cookie max-age from 10m seconds to 1 week 2021-09-06 15:32:39 -07:00
diced
a06d5ffaed fix(api): sort images count and types count 2021-09-06 15:22:36 -07:00
diced
606821a2c0 fix(components): add skeleton placeholders to dashboard 2021-09-06 14:54:25 -07:00
diced
5c980c21e5 feat(api): allow bulk uploading (#97) 2021-09-05 11:23:52 -07:00
diced
771cc380df fix(api): maybe fix default user not being created 2021-09-05 09:14:19 -07:00
diced
38217870fe fix(api): maybe fix default user not being created 2021-09-05 09:13:13 -07:00
dicedtomato
5b82c96a43 Update README.md 2021-09-04 15:01:08 -07:00
diced
6f5f9869ad refactor(assets): update assets to v3 2021-09-04 14:42:38 -07:00
diced
b29bfeb8b1 fix(api): new way to handle non-embedded images to overwrite nextjs & supports discord now 2021-09-03 17:20:43 -07:00
diced
cb40559e49 fix(server): some changes 2021-09-03 17:03:47 -07:00
diced
90c72f7ffe fix(api): small images height strech fix 2021-09-03 16:50:14 -07:00
diced
002bd2e6f7 refactor(api): redirect non-embedded images to /r 2021-09-03 16:40:50 -07:00
diced
7b44f17a64 refactor(api): /raw -> /r 2021-09-03 16:26:04 -07:00
diced
b5c83f92e3 fix(api): fix images not showing 2021-09-02 21:46:10 -07:00
diced
51b4d64a93 fix(build): fix some docker stuff 2021-09-02 21:27:12 -07:00
diced
62c9e0a22f feat(api): add support for invisible images 2021-09-02 21:00:16 -07:00
diced
3daac34d3e feat(api): add support for invisible images 2021-09-02 20:59:30 -07:00
dependabot[bot]
d80d5d1632 build(deps): bump next from 11.1.0 to 11.1.1 (#95)
Bumps [next](https://github.com/vercel/next.js) from 11.1.0 to 11.1.1.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v11.1.0...v11.1.1)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-02 06:51:13 -07:00
diced
912f716362 feat(api): add support for zws images 2021-08-30 20:56:34 -07:00
diced
16ecdf41af feat(components): added sharex config generator (#93) 2021-08-30 13:58:06 -07:00
Nguyen Thanh Quang
f0bb6b08fa feat(components): added sharex config generator (#93) 2021-08-30 07:59:08 -07:00
Nguyen Thanh Quang
efb4e2ce9a feat(sharex): added sharex config generator 2021-08-30 20:19:12 +07:00
diced
03238d10bf fix(config): notify which vars are missing 2021-08-28 21:41:04 -07:00
diced
e71590b9fb fix(config): new opts: admin_limit, user_limit, disabled_extensions (#68) 2021-08-28 21:02:04 -07:00
diced
4728f1cc46 fix(api): accidently sending images as a part of the user object 2021-08-28 19:37:38 -07:00
diced
794778dee2 feat(config): database section removed 2021-08-28 11:32:09 -07:00
Nguyen Thanh Quang
b5e882f07e feat(themes): added dracula theme (#92)
* added dracula theme

* change border color from white

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
2021-08-27 15:33:32 -07:00
dicedtomato
e7c58a4847 licence 2021-08-27 15:24:37 -07:00
dicedtomato
bdb44db25e security policy 2021-08-27 15:23:28 -07:00
diced
e8b82ffe62 feat(api): image favoriting (#67) 2021-08-27 13:48:22 -07:00
diced
53c53c009e fix(components): white text on links when light theme 2021-08-26 21:41:30 -07:00
Nguyen Thanh Quang
7e8cda4605 feat(components): ayu_mirage, ayu_light, nord, polar themes (#90) 2021-08-26 19:44:04 -07:00
diced
dfa0419a0a fix(api): fix many bugs 2021-08-26 15:18:14 -07:00
diced
aeb2638d1e feat: v3.2.0 - custom themes & curated themes 2021-08-26 12:33:18 -07:00
diced
c5cef56e2a feat: v3.2.0 - custom themes & curated themes 2021-08-26 12:32:51 -07:00
324 changed files with 36781 additions and 9016 deletions

View File

@@ -1,20 +0,0 @@
{
"presets": [
"next/babel"
],
"plugins": [
[
"babel-plugin-transform-imports",
{
"@material-ui/core": {
"transform": "@material-ui/core/${member}",
"preventFullImport": true
},
"@material-ui/icons": {
"transform": "@material-ui/icons/${member}",
"preventFullImport": true
}
}
]
]
}

12
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,12 @@
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-18
RUN usermod -l zipline node \
&& groupmod -n zipline node \
&& usermod -d /home/zipline zipline \
&& echo "zipline ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/zipline \
&& chmod 0440 /etc/sudoers.d/zipline \
&& sudo apt-get update && apt-get install gnupg2 -y
EXPOSE 3000
USER zipline

View File

@@ -0,0 +1,56 @@
{
"name": "Zipline Codespace",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/zipline",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"username": "zipline"
},
"ghcr.io/devcontainers/features/docker-in-docker:1": {
"dockerDashComposeVersion": "v2",
"installDockerBuildx": true
}
},
"customizations": {
"vscode": {
"settings": {
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"files.autoSave": "afterDelay",
"terminal.integrated.persistentSessionReviveProcess": "never",
"terminal.integrated.defaultProfile.linux": "zsh",
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "/bin/zsh",
"env": {
"ZSH_THEME": "devcontainers"
}
}
}
},
"extensions": ["prisma.prisma", "esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
}
},
"remoteUser": "zipline",
"updateRemoteUserUID": true,
"remoteEnv": {
"CORE_DATABASE_URL": "postgres://postgres:postgres@db/zip10"
},
"portsAttributes": {
"3000": {
"label": "Zipline",
"onAutoForward": "openBrowser"
},
"5432": {
"label": "Postgres"
}
},
"postCreateCommand": "sudo chown -R zipline:zipline /zipline && yarn install"
}

View File

@@ -0,0 +1,25 @@
version: '3.8'
services:
app:
build:
context: ./
dockerfile: Dockerfile
volumes:
- ../:/zipline:cached
- uploads:/zipline/uploads
- node_modules:/zipline/node_modules
command: sleep infinity
db:
image: postgres:latest
restart: unless-stopped
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DATABASE=postgres
volumes:
- pg_data:/var/lib/postgresql/data
volumes:
pg_data:
uploads:
node_modules:

7
.dockerignore Normal file
View File

@@ -0,0 +1,7 @@
node_modules/
.next/
uploads/
.git/
.yarn/*
!.yarn/releases
!.yarn/plugins

50
.env.local.example Normal file
View File

@@ -0,0 +1,50 @@
# every field in here is optional except, CORE_SECRET and CORE_DATABASE_URL.
# if CORE_SECRET is still "changethis" then zipline will exit and tell you to change it.
# if using s3/supabase make sure to uncomment or comment out the correct lines needed.
CORE_RETURN_HTTPS=true
CORE_SECRET="changethis"
CORE_HOST=0.0.0.0
CORE_PORT=3000
CORE_DATABASE_URL="postgres://postgres:postgres@db/zip10"
CORE_LOGGER=false
CORE_STATS_INTERVAL=1800
CORE_INVITES_INTERVAL=1800
CORE_THUMBNAILS_INTERVAL=600
# default
DATASOURCE_TYPE=local
DATASOURCE_LOCAL_DIRECTORY=./uploads
# or you can choose to use s3
# DATASOURCE_TYPE=s3
# DATASOURCE_S3_ACCESS_KEY_ID=key
# DATASOURCE_S3_SECRET_ACCESS_KEY=secret
# DATASOURCE_S3_BUCKET=bucket
# DATASOURCE_S3_ENDPOINT=s3.amazonaws.com
# DATASOURCE_S3_REGION=us-west-2
# DATASOURCE_S3_FORCE_S3_PATH=false
# DATASOURCE_S3_USE_SSL=false
# or supabase
# DATASOURCE_TYPE=supabase
# DATASOURCE_SUPABASE_KEY=xxx
# remember: no leading slash
# DATASOURCE_SUPABASE_URL=https://something.supabase.co
# DATASOURCE_SUPABASE_BUCKET=zipline
UPLOADER_DEFAULT_FORMAT=RANDOM
UPLOADER_ROUTE=/u
UPLOADER_LENGTH=6
UPLOADER_ADMIN_LIMIT=104900000
UPLOADER_USER_LIMIT=104900000
UPLOADER_DISABLED_EXTENSIONS=someext,anotherext
URLS_ROUTE=/go
URLS_LENGTH=6
RATELIMIT_USER=5
RATELIMIT_ADMIN=3
# for more variables checkout the docs

7
.eslintignore Normal file
View File

@@ -0,0 +1,7 @@
node_modules
dist
.yarn
.devcontainer
.github
.next
.vscode

View File

@@ -1,24 +0,0 @@
module.exports = {
'extends': ['next', 'next/core-web-vitals'],
'rules': {
'indent': ['error', 2],
'linebreak-style': ['error', 'unix'],
'quotes': ['error', 'single'],
'semi': ['error', 'always'],
'jsx-quotes': ['error', 'prefer-single'],
'react/prop-types': 'off',
'react-hooks/rules-of-hooks': 'off',
'react-hooks/exhaustive-deps': 'off',
'react/jsx-uses-react': 'warn',
'react/jsx-uses-vars': 'warn',
'react/no-danger-with-children': 'warn',
'react/no-deprecated': 'warn',
'react/no-direct-mutation-state': 'warn',
'react/no-is-mounted': 'warn',
'react/no-typos': 'error',
'react/react-in-jsx-scope': 'error',
'react/require-render-return': 'error',
'react/style-prop-object': 'warn',
'@next/next/no-img-element': 'off'
}
};

49
.eslintrc.json Normal file
View File

@@ -0,0 +1,49 @@
{
"root": true,
"extends": [
"next",
"next/core-web-vitals",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": ["unused-imports", "@typescript-eslint"],
"parser": "@typescript-eslint/parser",
"rules": {
"linebreak-style": ["error", "unix"],
"quotes": [
"error",
"single",
{
"avoidEscape": true
}
],
"semi": ["error", "always"],
"comma-dangle": ["error", "always-multiline"],
"jsx-quotes": ["error", "prefer-single"],
"indent": "off",
"react/prop-types": "off",
"react-hooks/rules-of-hooks": "off",
"react-hooks/exhaustive-deps": "off",
"react/jsx-uses-react": "warn",
"react/jsx-uses-vars": "warn",
"react/no-danger-with-children": "warn",
"react/no-deprecated": "warn",
"react/no-direct-mutation-state": "warn",
"react/no-is-mounted": "warn",
"react/no-typos": "error",
"react/react-in-jsx-scope": "off",
"react/require-render-return": "error",
"react/style-prop-object": "warn",
"@next/next/no-img-element": "off",
"jsx-a11y/alt-text": "off",
"react/display-name": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{ "vars": "all", "varsIgnorePattern": "^_", "args": "after-used", "argsIgnorePattern": "^_" }
],
"@typescript-eslint/ban-ts-comment": "off"
}
}

14
.gitattributes vendored Normal file
View File

@@ -0,0 +1,14 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text eol=lf
# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.h text
# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary

3
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,3 @@
# These are supported funding model platforms
github: diced

52
.github/ISSUE_TEMPLATE/bug.yml vendored Normal file
View File

@@ -0,0 +1,52 @@
name: Bug
description: File a bug report
title: 'Bug: '
labels: ['bug']
body:
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Provide steps to reproduce the bug, and some context.
value: 'A bug happened!'
validations:
required: true
- type: dropdown
id: version
attributes:
label: Version
description: What version (or docker image) of Zipline are you using?
options:
- latest (ghcr.io/diced/zipline or ghcr.io/diced/zipline:latest)
- upstream (ghcr.io/diced/zipline:trunk)
- other (provide version in additional info)
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: What browser(s) are you seeing the problem on?
multiple: true
options:
- Firefox
- Chromium-based (Chrome, Edge, Brave, Opera, mobile chrome/chromium based, etc)
- Safari
- Firefox Mobile
- Safari Mobile
- type: textarea
id: zipline-logs
attributes:
label: Zipline Logs
description: Please copy and paste any relevant log output. Not seeing anything interesting? Try adding the `DEBUG=true` environment variable to see more logs, make sure to review the output and remove any sensitive information as it can be VERY verbose at times.
render: shell
- type: textarea
id: browser-logs
attributes:
label: Browser Logs
description: Please copy and paste any relevant log output.
render: shell
- type: textarea
id: additional-info
attributes:
label: Additional Info
description: Anything else that could be used to narrow down the issue, like your config.

11
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Feature Request
url: https://github.com/diced/zipline/discussions/new?category=ideas&title=Your%20brief%20description%20here&labels=feature
about: Ask for a new feature
- name: Zipline Discord
url: https://discord.gg/EAhCRfGxCF
about: Ask for help with anything related to Zipline!
- name: Zipline Docs
url: https://zipline.diced.sh
about: Maybe take a look a the docs?

View File

@@ -1,4 +1,4 @@
name: 'CI: Build'
name: 'Build'
on:
push:
@@ -11,24 +11,28 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
node-version: '18.x'
- name: 'Restore dependency cache'
id: cache-restore
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
path: |
node_modules
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}-
- name: Create mock config
run: echo -e "[uploader]\nroute = '/u'\nembed_route = '/a'\nlength = 6\ndirectory = './uploads'" > config.toml
- name: Install dependencies
if: steps.cache-restore.outputs.cache-hit != 'true'
run: yarn install
- name: Build
run: yarn build
env:
ZIPLINE_DOCKER_BUILD: true

59
.github/workflows/docker-release.yml vendored Normal file
View File

@@ -0,0 +1,59 @@
name: 'Push Release Docker Images'
on:
push:
tags:
- 'v*.*.*'
paths:
- 'src/**'
- 'server/**'
- 'prisma/**'
- '.github/**'
- 'Dockerfile'
workflow_dispatch:
jobs:
push:
name: Push Release Image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Get version
id: version
run: |
echo "zipline_version=$(jq .version package.json -r)" >> $GITHUB_OUTPUT
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Packages
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v3
with:
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/diced/zipline:latest
ghcr.io/diced/zipline:${{ steps.version.outputs.zipline_version }}
${{ secrets.DOCKERHUB_USERNAME }}/zipline:latest
${{ secrets.DOCKERHUB_USERNAME }}/zipline:${{ steps.version.outputs.zipline_version }}
cache-from: type=gha
cache-to: type=gha,mode=max

View File

@@ -1,4 +1,4 @@
name: 'CD: Push Docker Images'
name: 'Push Docker Images'
on:
push:
@@ -7,38 +7,52 @@ on:
- 'src/**'
- 'server/**'
- 'prisma/**'
- '.github/**'
- 'Dockerfile'
workflow_dispatch:
jobs:
push_to_ghcr:
name: Push Image to GitHub Packages
push:
name: Push Image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
- name: Get version
id: version
run: |
echo "zipline_version=$(jq .version package.json -r)" >> $GITHUB_OUTPUT
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to Github Packages
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: diced/zipline/zipline
dockerfile: Dockerfile
tag_with_ref: true
push_to_dockerhub:
name: Push Image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Push to Docker Hub
uses: docker/build-push-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: diced/zipline
dockerfile: Dockerfile
tag_with_ref: true
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v3
with:
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/diced/zipline:trunk
ghcr.io/diced/zipline:trunk-${{ steps.version.outputs.zipline_version }}
${{ secrets.DOCKERHUB_USERNAME }}/zipline:trunk
${{ secrets.DOCKERHUB_USERNAME }}/zipline:trunk-${{ steps.version.outputs.zipline_version }}
cache-from: type=gha
cache-to: type=gha,mode=max

31
.github/workflows/milestone.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
name: 'Issue/PR Milestones'
on:
pull_request_target:
types: [opened, reopened]
issues:
types: [opened, reopened]
permissions:
issues: write
checks: write
contents: read
pull-requests: write
jobs:
set:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const milestone = 3
github.rest.issues.update({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
milestone
})

10
.gitignore vendored
View File

@@ -5,6 +5,11 @@
/.pnp
.pnp.js
# yarn
.yarn/*
!.yarn/releases
!.yarn/plugins
# testing
/coverage
@@ -18,6 +23,7 @@
# misc
.DS_Store
*.pem
.idea
# debug
npm-debug.log*
@@ -35,5 +41,5 @@ yarn-error.log*
# zipline
config.toml
uploads/
data.db*
uploads*/
dist/

1
.husky/.gitignore vendored
View File

@@ -1 +0,0 @@
_

View File

@@ -1,4 +0,0 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn commitlint --edit $1

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
package-lock=false

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
18.12.0

5
.prettierrc.json Normal file
View File

@@ -0,0 +1,5 @@
{
"singleQuote": true,
"jsxSingleQuote": true,
"printWidth": 110
}

5
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"editor.tabSize": 2,
"files.eol": "\n",
"typescript.tsdk": "node_modules/typescript/lib"
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

823
.yarn/releases/yarn-3.3.1.cjs vendored Normal file

File diff suppressed because one or more lines are too long

11
.yarnrc.yml Normal file
View File

@@ -0,0 +1,11 @@
checksumBehavior: update
nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
yarnPath: .yarn/releases/yarn-3.3.1.cjs

23
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,23 @@
# Contributing
## Bug reports
Create an issue on GitHub, please include the following (if one of them is not applicable to the issue then it's not needed):
- The steps to reproduce the bug
- Logs of Zipline
- The version of Zipline
- Your OS & Browser including server OS
- What you were expecting to see
## Feature requests
Create an discussion on GitHub, please include the following:
- Brief explanation of the feature in the title (very brief please)
- How it would work (detailed, but optional)
## Pull Requests (contributions to the codebase)
Create a pull request on GitHub. If your PR does not pass the action checks, then please fix the errors. If your PR was submitted before a release, and I have pushed a new release, please make sure to update your PR to reflect any changes, usually this is handled by GitHub.
Please make sure your code also reflects the style of the rest of the code.

View File

@@ -1,31 +1,76 @@
FROM node:16-alpine3.11 AS builder
WORKDIR /build
# Use the Prisma binaries image as the first stage
FROM ghcr.io/diced/prisma-binaries:5.1.x AS prisma
COPY src ./src
COPY server ./server
COPY scripts ./scripts
COPY prisma ./prisma
# Use Alpine Linux as the second stage
FROM node:18-alpine3.16 AS base
COPY package.json yarn.lock next.config.js next-env.d.ts zip-env.d.ts tsconfig.json ./
RUN yarn install
# create a mock config.toml to spoof next build!
RUN echo -e "[uploader]\nroute = '/u'\nembed_route = '/a'\nlength = 6\ndirectory = './uploads'" > config.toml
RUN yarn build
FROM node:16-alpine3.11 AS runner
# Set the working directory
WORKDIR /zipline
COPY --from=builder /build/node_modules ./node_modules
# Copy the necessary files from the project
COPY prisma ./prisma
COPY --from=builder /build/src ./src
COPY --from=builder /build/server ./server
COPY --from=builder /build/scripts ./scripts
COPY --from=builder /build/prisma ./prisma
COPY --from=builder /build/.next ./.next
COPY --from=builder /build/tsconfig.json ./tsconfig.json
COPY --from=builder /build/package.json ./package.json
COPY .yarn ./.yarn
COPY package*.json ./
COPY yarn*.lock ./
COPY .yarnrc.yml ./
CMD ["node", "server"]
# Copy the prisma binaries from prisma stage
COPY --from=prisma /prisma-engines /prisma-engines
ENV PRISMA_QUERY_ENGINE_BINARY=/prisma-engines/query-engine \
PRISMA_SCHEMA_ENGINE_BINARY=/prisma-engines/schema-engine \
PRISMA_CLI_QUERY_ENGINE_TYPE=binary \
PRISMA_CLIENT_ENGINE_TYPE=binary \
ZIPLINE_DOCKER_BUILD=true \
NEXT_TELEMETRY_DISABLED=1
# Install the dependencies
RUN yarn install --immutable
FROM base AS builder
COPY src ./src
COPY next.config.js ./next.config.js
COPY tsup.config.ts ./tsup.config.ts
COPY tsconfig.json ./tsconfig.json
COPY mimes.json ./mimes.json
COPY public ./public
# Run the build
RUN yarn build
# Use Alpine Linux as the final image
FROM base
# Install the necessary packages
RUN apk add --no-cache perl procps tini
COPY --from=prisma /prisma-engines /prisma-engines
ENV PRISMA_QUERY_ENGINE_BINARY=/prisma-engines/query-engine \
PRISMA_SCHEMA_ENGINE_BINARY=/prisma-engines/schema-engine \
PRISMA_CLI_QUERY_ENGINE_TYPE=binary \
PRISMA_CLIENT_ENGINE_TYPE=binary \
ZIPLINE_DOCKER_BUILD=true \
NEXT_TELEMETRY_DISABLED=1
# Copy only the necessary files from the previous stage
COPY --from=builder /zipline/dist ./dist
COPY --from=builder /zipline/.next ./.next
COPY --from=builder /zipline/mimes.json ./mimes.json
COPY --from=builder /zipline/next.config.js ./next.config.js
COPY --from=builder /zipline/public ./public
# Copy Startup Script
COPY docker-entrypoint.sh /zipline
# Make Startup Script Executable
RUN chmod a+x /zipline/docker-entrypoint.sh && rm -rf /zipline/src
# Clean up
RUN rm -rf /tmp/* /root/*
RUN yarn cache clean --all
# Set the entrypoint to the startup script
ENTRYPOINT ["tini", "--", "/zipline/docker-entrypoint.sh"]

View File

@@ -1,3 +0,0 @@
prisma/migrations
node_modules
.next

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 dicedtomato
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

176
README.md
View File

@@ -1,26 +1,172 @@
<p align="center"><img src="https://raw.githubusercontent.com/diced/zipline/trunk/public/zipline_small.png"/></p>
<div align="center">
<img src="https://raw.githubusercontent.com/diced/zipline/trunk/public/zipline_small.png"/>
![Version](https://img.shields.io/github/package-json/v/diced/zipline)
![LICENCE](https://img.shields.io/github/license/diced/zipline)
[![Discord](https://img.shields.io/discord/729771078196527176)](https://discord.gg/EAhCRfGxCF)
![Stars](https://img.shields.io/github/stars/diced/zipline)
![GitHub repo size](https://img.shields.io/github/repo-size/diced/zipline)
![GitHub last commit (branch)](https://img.shields.io/github/last-commit/diced/zipline/trunk)
<br>
A ShareX/file upload server that is easy to use, packed with features, and with an easy setup!
# Zipline
![Stars](https://img.shields.io/github/stars/diced/zipline?logo=github&style=flat)
![Version](https://img.shields.io/github/package-json/v/diced/zipline?logo=git&logoColor=white&style=flat)
![GitHub last commit (branch)](https://img.shields.io/github/last-commit/diced/zipline/trunk?logo=git&logoColor=white&style=flat)
[![Discord](https://img.shields.io/discord/729771078196527176?color=%23777ed3&label=discord&logo=discord&logoColor=white&style=flat)](https://discord.gg/EAhCRfGxCF)
Fast & lightweight file uploading.
![Build](https://img.shields.io/github/actions/workflow/status/diced/zipline/build.yml?logo=github&style=flat&branch=trunk)
[![Docker Image (trunk)](https://img.shields.io/github/actions/workflow/status/diced/zipline/docker.yml?label=Docker%20%28trunk%29&logo=github&style=flat&branch=trunk)](https://github.com/diced/zipline/pkgs/container/zipline/?tag=trunk)
[![Docker Image (release)](https://img.shields.io/github/actions/workflow/status/diced/zipline/docker-release.yml?label=Docker%20%28release%29&logo=github&style=flat&branch=trunk)](https://github.com/diced/zipline/pkgs/container/zipline/?tag=latest)
# Features
</div>
## Features
- Configurable
- Fast
- Built with Next.js & React
- Support for **multible database types**
- Token protected uploading
- Easy setup instructions on [docs](https://zipline.diced.me)
- Image uploading
- Image compression
- Password Protected Uploads
- URL shortening
- Text uploading
- URL Formats (uuid, dates, random alphanumeric, original name, zws, gfycat -> [animals](https://assets.gfycat.com/animals) [adjectives](https://assets.gfycat.com/adjectives))
- Discord embeds (OG metadata)
- Gallery viewer, and multiple file format support
- Code highlighting
- Fully customizable Discord webhook notifications
- OAuth2 registration (Discord and GitHub)
- Two-Factor authentication with Google Authenticator, Authy, etc (totp services).
- User invites
- File Chunking (for large files)
- File deletion once it reaches a certain amount of views
- Automatic video thumbnail generation
- Easy setup instructions on [docs](https://zipl.vercel.app/) (One command install `docker compose up -d`)
# Installing
<details>
<summary><h2>Screenshots (click)</h2></summary>
View full album at [imgur](https://imgur.com/a/GzyowZ7)
![Login Page](https://i.imgur.com/14Er7qt.png)
![Dashboard](https://i.imgur.com/3JK5bp6.png)
![Files Page](https://i.imgur.com/grIaDs8.png)
</details>
[See how to install here](https://zipline.diced.me/docs/getting-started)
# Usage
## Install & run with Docker
This section requires [Docker](https://docs.docker.com/get-docker/) and [docker compose](https://docs.docker.com/compose/install/).
```shell
git clone https://github.com/diced/zipline
cd zipline
docker compose up -d
```
### After installing
After installing, please edit the `docker-compose.yml` file and find the line that says `SECRET=changethis` and replace `changethis` with a random string.
Ways you could generate the string could be from a password managers generator, or you could just slam your keyboard and hope for the best.
## Building & running from source
This section requires [nodejs](https://nodejs.org), [yarn](https://yarnpkg.com/).
It is recommended to not use npm, as it can cause issues with the build process.
Before you run `yarn build`, you might want to configure Zipline, as when building from source Zipline will need to read some sort of configuration. The only two variables needed are `CORE_SECRET` and `CORE_DATABASE_URL`.
```shell
git clone https://github.com/diced/zipline
cd zipline
yarn install
yarn build
yarn start
```
# NGINX Proxy
This section requires [NGINX](https://nginx.org/).
```nginx
server {
listen 80 default_server;
client_max_body_size 100M;
server_name <your domain (optional)>;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
```
# Website
The default port is `3000`, once you have accessed it you can see a login screen. The default credentials are "administrator" and "password". Once you login please immediately change the details to something more secure. You can do this by clicking on the top right corner where it says "administrator" with a gear icon and clicking Manage Account.
# ShareX (Windows)
This section requires [ShareX](https://www.getsharex.com/).
After navigating to Zipline, click on the top right corner where it says your username and click Manage Account. Scroll down to see "ShareX Config", select the one you would prefer using. After this you can import the .sxcu into sharex. [More information here](https://zipl.vercel.app/docs/guides/uploaders/sharex)
# Flameshot (Linux(Xorg/Wayland) and macOS)
This section requires [Flameshot](https://www.flameshot.org/), [jq](https://stedolan.github.io/jq/), and [xsel](https://github.com/kfish/xsel).
<details>
<summary>Wayland instructions</summary>
If using wayland you will need to have [wl-clipboard](https://github.com/bugaevc/wl-clipboard) installed, for the `wl-copy` command.
If you are not using GNOME/KDE/Qtile/Sway, and are using something like a wlroots-based or wlroots-compatible compositor (ex. [Hyprland](https://github.com/hyprwm/Hyprland/), [River](https://github.com/riverwm/river), etc), you will need to set the `XDG_CURRENT_DESKTOP` environment variable to `sway`, which will just override it for this script. Adding `export XDG_CURRENT_DESKTOP=sway` to the start of the script will work.
After this, replace the `xsel -ib` with `wl-copy` in the script.
</details>
<details>
<summary>Mac instructions</summary>
If using macOS, you can replace the `xsel -ib` with `pbcopy` in the script.
</details>
You can either use the script below, or generate one directly from Zipline (just like how you can generate a ShareX config).
To upload files using flameshot we will use a script. Replace $TOKEN and $HOST with your own values, you probably know how to do this if you use linux.
```shell
DATE=$(date '+%h_%Y_%d_%I_%m_%S.png');
flameshot gui -r > ~/Pictures/$DATE;
curl -H "Content-Type: multipart/form-data" -H "authorization: $TOKEN" -F file=@$1 $HOST/api/upload | jq -r '.files[0]' | xsel -ib
```
# Contributing
## Bug reports
Create an issue on GitHub and use the template, please include the following (if one of them is not applicable to the issue then it's not needed):
- The steps to reproduce the bug
- Logs of Zipline
- The version of Zipline
- Your OS & Browser including server OS
- What you were expecting to see
## Feature requests
Create a discussion on GitHub, please include the following:
- Brief explanation of the feature in the title (very brief please)
- How it would work (Be detailed!)
## Pull Requests (contributions to the codebase)
Create a pull request on GitHub. If your PR does not pass the action checks, then please fix the errors. If your PR was submitted before a release, and I have pushed a new release, please make sure to update your PR to reflect any changes, usually this is handled by GitHub.
# Documentation
Documentation source code is located in [diced/zipline-docs](https://github.com/diced/zipline-docs), and can be accessed [here](https://zipline.diced.sh/docs/get-started).

13
SECURITY.md Normal file
View File

@@ -0,0 +1,13 @@
# Security Policy
## Supported Versions
| Version | Supported |
| ------- | ------------------ |
| 3.6.x | :white_check_mark: |
| < 3 | :x: |
| < 2 | :x: |
## Reporting a Vulnerability
Report a Vulnerability by issuing a bug report, with exact details with how the vulnerability happened, what "exploits" can happen, and possible fixes (optional). Vulnerability reports are treated with high priority and will be resolved most of the time quickly.

View File

@@ -1,53 +0,0 @@
module.exports = {
parserPreset: 'conventional-changelog-conventionalcommits',
rules: {
'body-leading-blank': [1, 'always'],
'body-max-line-length': [2, 'always', 100],
'footer-leading-blank': [1, 'always'],
'footer-max-line-length': [2, 'always', 100],
'header-max-length': [2, 'always', 100],
'subject-case': [
2,
'never',
['sentence-case', 'start-case', 'pascal-case', 'upper-case'],
],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
],
],
'scope-enum': [
1,
'always',
[
'prisma',
'scripts',
'server',
'pages',
'api',
'hooks',
'components',
'middleware',
'redux',
'themes',
'lib'
],
],
},
};

View File

@@ -1,15 +0,0 @@
[core]
secure = true
secret = 'some secret'
host = '0.0.0.0'
port = 3000
[database]
type = 'psql'
url = 'postgres://postgres:postgres@postgres/postgres'
[uploader]
route = '/u'
embed_route = '/a'
length = 6
directory = './uploads'

32
docker-compose.dev.yml Normal file
View File

@@ -0,0 +1,32 @@
version: '3'
services:
postgres:
image: postgres:15
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DATABASE=postgres
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 10s
timeout: 5s
retries: 5
zipline:
build:
context: .
dockerfile: Dockerfile
ports:
- '3000:3000'
env_file:
- .env.local
volumes:
- './uploads:/zipline/uploads'
- './public:/zipline/public'
depends_on:
- 'postgres'
volumes:
pg_data:

View File

@@ -1,12 +1,13 @@
version: '3'
services:
postgres:
image: postgres
environment:
image: postgres:15
restart: unless-stopped
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DATABASE=postgres
volumes:
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
@@ -15,27 +16,22 @@ services:
retries: 5
zipline:
image: diced/zipline:trunk
image: ghcr.io/diced/zipline
ports:
- '3000:3000'
restart: unless-stopped
environment:
- SECURE=false
- SECRET=changethis
- HOST=0.0.0.0
- PORT=3000
- DATABASE_TYPE=psql
- DATABASE_URL=postgresql://postgres:postgres@postgres/postgres/
- UPLOADER_ROUTE=/u
- UPLOADER_EMBED_ROUTE=/a
- UPLOADER_LENGTH=6
- UPLOADER_DIRECTORY=./uploads
environment:
- CORE_RETURN_HTTPS=false
- CORE_SECRET=changethis
- CORE_HOST=0.0.0.0
- CORE_PORT=3000
- CORE_DATABASE_URL=postgres://postgres:postgres@postgres/postgres
- CORE_LOGGER=true
volumes:
- '$PWD/uploads:/zipline/uploads'
- '$PWD/prisma:/zipline/prisma'
- '$PWD/public:/zipline/public'
- './uploads:/zipline/uploads'
- './public:/zipline/public'
depends_on:
- 'postgres'
volumes:
pg_data:
pg_data:

7
docker-entrypoint.sh Normal file
View File

@@ -0,0 +1,7 @@
#!/bin/sh
set -e
unset ZIPLINE_DOCKER_BUILD
node --enable-source-maps dist/index.js

1387
mimes.json Normal file

File diff suppressed because it is too large Load Diff

1
next-env.d.ts vendored
View File

@@ -1,5 +1,4 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited

View File

@@ -1,4 +1,17 @@
/**
* @type {import('next').NextConfig}
**/
module.exports = {
images: {
domains: [
// For sharex icon in manage user
'getsharex.com',
// For flameshot icon, and maybe in the future other stuff from github
'raw.githubusercontent.com',
// Google Icon
'madeby.google.com',
],
},
poweredByHeader: false,
reactStrictMode: true,
};

View File

@@ -1,62 +1,104 @@
{
"name": "zip3",
"version": "3.1.0",
"name": "zipline",
"version": "3.7.11",
"license": "MIT",
"scripts": {
"prepare": "husky install",
"dev": "NODE_ENV=development node server",
"build": "npm-run-all build:schema build:next",
"dev": "npm-run-all build:server dev:run",
"dev:run": "cross-env DEBUG=true REACT_EDITOR=code NODE_ENV=development RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=false node --enable-source-maps dist",
"build": "npm-run-all build:server build:schema build:next",
"build-ci": "cross-env ZIPLINE_DOCKER_BUILD=1 npm-run-all build:server build:schema build:next",
"build:server": "tsup",
"build:next": "next build",
"build:schema": "prisma generate --schema=prisma/schema.prisma",
"start": "node server",
"format": "prettier --write ./src/**/*.{ts,tsx} ./*.{md,js,json,yml}",
"migrate:dev": "prisma migrate dev --create-only",
"start": "node dist",
"lint": "next lint",
"ts-node": "ts-node --compiler-options \"{\\\"module\\\":\\\"commonjs\\\"}\" --transpile-only",
"create-all-migrations": "node scripts/create-migrations",
"semantic-release": "semantic-release"
"compose:up": "docker compose up",
"compose:down": "docker compose down",
"compose:build-dev": "docker compose --file docker-compose.dev.yml up --build",
"compose:up-dev": "docker compose --file docker-compose.dev.yml up",
"compose:down-dev": "docker compose --file docker-compose.dev.yml down",
"scripts:read-config": "node --enable-source-maps dist/scripts/read-config",
"scripts:import-dir": "node --enable-source-maps dist/scripts/import-dir",
"scripts:list-users": "node --enable-source-maps dist/scripts/list-users",
"scripts:set-user": "node --enable-source-maps dist/scripts/set-user",
"scripts:clear-zero-byte": "node --enable-source-maps dist/scripts/clear-zero-byte",
"scripts:query-size": "node --enable-source-maps dist/scripts/query-size",
"scripts:clear-temp": "node --enable-source-maps dist/scripts/clear-temp"
},
"dependencies": {
"@emotion/react": "^11.4.0",
"@emotion/styled": "^11.3.0",
"@iarna/toml": "2.2.5",
"@material-ui/core": "^5.0.0-alpha.37",
"@material-ui/data-grid": "^4.0.0-alpha.32",
"@material-ui/icons": "^5.0.0-alpha.37",
"@material-ui/styles": "^5.0.0-alpha.35",
"@prisma/client": "^2.30.0",
"@reduxjs/toolkit": "^1.6.0",
"argon2": "^0.28.2",
"colorette": "^1.2.2",
"cookie": "^0.4.1",
"copy-to-clipboard": "^3.3.1",
"fecha": "^4.2.1",
"formik": "^2.2.9",
"multer": "^1.4.2",
"next": "11.1.0",
"prisma": "^2.30.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-dropzone": "^11.3.2",
"react-redux": "^7.2.4",
"redux": "^4.1.0",
"redux-thunk": "^2.3.0",
"yup": "^0.32.9"
"@emotion/react": "^11.11.1",
"@emotion/server": "^11.11.0",
"@mantine/core": "^6.0.21",
"@mantine/dropzone": "^6.0.21",
"@mantine/form": "^6.0.21",
"@mantine/hooks": "^6.0.21",
"@mantine/modals": "^6.0.21",
"@mantine/next": "^6.0.21",
"@mantine/notifications": "^6.0.21",
"@mantine/prism": "^6.0.21",
"@mantine/spotlight": "^6.0.21",
"@prisma/client": "^5.1.1",
"@prisma/internals": "^5.1.1",
"@prisma/migrate": "^5.1.1",
"@sapphire/shapeshift": "^3.9.3",
"@tabler/icons-react": "^2.41.0",
"@tanstack/react-query": "^4.28.0",
"argon2": "^0.31.2",
"cookie": "^0.6.0",
"dayjs": "^1.11.10",
"dotenv": "^16.3.1",
"dotenv-expand": "^10.0.0",
"exiftool-vendored": "^23.4.0",
"fastify": "^4.24.3",
"fastify-plugin": "^4.5.1",
"fflate": "^0.8.1",
"ffmpeg-static": "^5.2.0",
"find-my-way": "^7.7.0",
"katex": "^0.16.9",
"mantine-datatable": "^2.9.14",
"minio": "^7.1.3",
"ms": "canary",
"multer": "^1.4.5-lts.1",
"next": "^14.0.3",
"otplib": "^12.0.1",
"prisma": "^5.1.1",
"prismjs": "^1.29.0",
"qrcode": "^1.5.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-markdown": "^8.0.6",
"recharts": "^2.10.1",
"recoil": "^0.7.7",
"remark-gfm": "^4.0.0",
"sharp": "^0.32.6"
},
"devDependencies": {
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@types/cookie": "^0.4.0",
"@types/multer": "^1.4.6",
"@types/node": "^15.12.2",
"babel-plugin-transform-imports": "^2.0.0",
"eslint": "7.28.0",
"eslint-config-next": "11.0.0",
"husky": "^6.0.0",
"@types/cookie": "^0.5.4",
"@types/katex": "^0.16.6",
"@types/minio": "^7.1.1",
"@types/multer": "^1.4.10",
"@types/node": "18",
"@types/qrcode": "^1.5.5",
"@types/react": "^18.2.37",
"@types/sharp": "^0.32.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"cross-env": "^7.0.3",
"eslint": "^8.54.0",
"eslint-config-next": "^14.0.3",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-unused-imports": "^3.0.0",
"npm-run-all": "^4.1.5",
"release": "^6.3.0",
"ts-node": "^10.0.0",
"typescript": "^4.3.2"
"prettier": "^3.1.0",
"tsup": "^8.0.0",
"typescript": "^5.2.2"
},
"repository": {
"type": "git",
"url": "https://github.com/diced/workflow-testing.git"
}
"url": "https://github.com/diced/zipline.git"
},
"packageManager": "yarn@3.3.1"
}

View File

@@ -0,0 +1,25 @@
-- AlterTable
ALTER TABLE "User" ADD COLUMN "systemTheme" TEXT NOT NULL DEFAULT E'dark_blue';
-- CreateTable
CREATE TABLE "Theme" (
"id" SERIAL NOT NULL,
"type" TEXT NOT NULL,
"primary" TEXT NOT NULL,
"secondary" TEXT NOT NULL,
"error" TEXT NOT NULL,
"warning" TEXT NOT NULL,
"info" TEXT NOT NULL,
"border" TEXT NOT NULL,
"mainBackground" TEXT NOT NULL,
"paperBackground" TEXT NOT NULL,
"userId" INTEGER NOT NULL,
PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "Theme_userId_unique" ON "Theme"("userId");
-- AddForeignKey
ALTER TABLE "Theme" ADD FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Image" ADD COLUMN "favorite" BOOLEAN NOT NULL DEFAULT false;

View File

@@ -0,0 +1,25 @@
/*
Warnings:
- A unique constraint covering the columns `[imageId]` on the table `InvisibleImage` will be added. If there are existing duplicate values, this will fail.
- Added the required column `imageId` to the `InvisibleImage` table without a default value. This is not possible if the table is not empty.
*/
-- DropForeignKey
ALTER TABLE "InvisibleImage" DROP CONSTRAINT "InvisibleImage_id_fkey";
-- DropIndex
DROP INDEX "InvisibleImage_id_unique";
-- AlterTable
CREATE SEQUENCE "invisibleimage_id_seq";
ALTER TABLE "InvisibleImage" ADD COLUMN "imageId" INTEGER NOT NULL,
ALTER COLUMN "id" SET DEFAULT nextval('invisibleimage_id_seq'),
ADD PRIMARY KEY ("id");
ALTER SEQUENCE "invisibleimage_id_seq" OWNED BY "InvisibleImage"."id";
-- CreateIndex
CREATE UNIQUE INDEX "InvisibleImage_imageId_unique" ON "InvisibleImage"("imageId");
-- AddForeignKey
ALTER TABLE "InvisibleImage" ADD FOREIGN KEY ("imageId") REFERENCES "Image"("id") ON DELETE CASCADE ON UPDATE CASCADE;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Image" ADD COLUMN "embed" BOOLEAN NOT NULL DEFAULT false;

View File

@@ -0,0 +1,39 @@
/*
Warnings:
- You are about to drop the `InvisibleUrl` table. If the table is not empty, all the data it contains will be lost.
- You are about to drop the `Url` table. If the table is not empty, all the data it contains will be lost.
*/
-- DropForeignKey
ALTER TABLE "Image" DROP CONSTRAINT "Image_userId_fkey";
-- DropForeignKey
ALTER TABLE "InvisibleImage" DROP CONSTRAINT "InvisibleImage_imageId_fkey";
-- DropForeignKey
ALTER TABLE "InvisibleUrl" DROP CONSTRAINT "InvisibleUrl_id_fkey";
-- DropForeignKey
ALTER TABLE "Theme" DROP CONSTRAINT "Theme_userId_fkey";
-- DropForeignKey
ALTER TABLE "Url" DROP CONSTRAINT "Url_userId_fkey";
-- DropTable
DROP TABLE "InvisibleUrl";
-- DropTable
DROP TABLE "Url";
-- AddForeignKey
ALTER TABLE "Theme" ADD CONSTRAINT "Theme_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Image" ADD CONSTRAINT "Image_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "InvisibleImage" ADD CONSTRAINT "InvisibleImage_imageId_fkey" FOREIGN KEY ("imageId") REFERENCES "Image"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- RenameIndex
ALTER INDEX "InvisibleImage.invis_unique" RENAME TO "InvisibleImage_invis_key";

View File

@@ -0,0 +1,34 @@
-- CreateTable
CREATE TABLE "Url" (
"id" TEXT NOT NULL,
"destination" TEXT NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"views" INTEGER NOT NULL DEFAULT 0,
"userId" INTEGER NOT NULL,
CONSTRAINT "Url_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "InvisibleUrl" (
"id" SERIAL NOT NULL,
"invis" TEXT NOT NULL,
"urlId" TEXT NOT NULL,
CONSTRAINT "InvisibleUrl_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "Url_id_key" ON "Url"("id");
-- CreateIndex
CREATE UNIQUE INDEX "InvisibleUrl_invis_key" ON "InvisibleUrl"("invis");
-- CreateIndex
CREATE UNIQUE INDEX "InvisibleUrl_urlId_unique" ON "InvisibleUrl"("urlId");
-- AddForeignKey
ALTER TABLE "Url" ADD CONSTRAINT "Url_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "InvisibleUrl" ADD CONSTRAINT "InvisibleUrl_urlId_fkey" FOREIGN KEY ("urlId") REFERENCES "Url"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Url" ADD COLUMN "vanity" TEXT;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "User" ADD COLUMN "embedSiteName" TEXT DEFAULT E'{image.file} • {user.name}';

View File

@@ -0,0 +1,11 @@
-- AlterTable
ALTER TABLE "User" ADD COLUMN "ratelimited" BOOLEAN NOT NULL DEFAULT false;
-- RenameIndex
ALTER INDEX "InvisibleImage_imageId_unique" RENAME TO "InvisibleImage_imageId_key";
-- RenameIndex
ALTER INDEX "InvisibleUrl_urlId_unique" RENAME TO "InvisibleUrl_urlId_key";
-- RenameIndex
ALTER INDEX "Theme_userId_unique" RENAME TO "Theme_userId_key";

View File

@@ -0,0 +1,8 @@
-- CreateTable
CREATE TABLE "Stats" (
"id" SERIAL NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"data" JSONB NOT NULL,
CONSTRAINT "Stats_pkey" PRIMARY KEY ("id")
);

View File

@@ -0,0 +1,5 @@
-- CreateEnum
CREATE TYPE "ImageFormat" AS ENUM ('UUID', 'DATE', 'RANDOM');
-- AlterTable
ALTER TABLE "Image" ADD COLUMN "format" "ImageFormat" NOT NULL DEFAULT E'RANDOM';

View File

@@ -0,0 +1,2 @@
-- AlterEnum
ALTER TYPE "ImageFormat" ADD VALUE 'NAME';

View File

@@ -0,0 +1,12 @@
/*
Warnings:
- You are about to drop the `Theme` table. If the table is not empty, all the data it contains will be lost.
*/
-- DropForeignKey
ALTER TABLE "Theme" DROP CONSTRAINT "Theme_userId_fkey";
-- AlterTable
ALTER TABLE "User" ALTER COLUMN "systemTheme" SET DEFAULT E'system';
-- DropTable
DROP TABLE "Theme";

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "User" ADD COLUMN "domains" TEXT[];

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Image" ADD COLUMN "password" TEXT;

View File

@@ -0,0 +1,9 @@
/*
Warnings:
- You are about to drop the column `ratelimited` on the `User` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "User" DROP COLUMN "ratelimited",
ADD COLUMN "ratelimit" TIMESTAMP(3);

View File

@@ -0,0 +1,17 @@
-- CreateTable
CREATE TABLE "Invite" (
"id" SERIAL NOT NULL,
"code" TEXT NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"expires_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"used" BOOLEAN NOT NULL DEFAULT false,
"createdById" INTEGER NOT NULL,
CONSTRAINT "Invite_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "Invite_code_key" ON "Invite"("code");
-- AddForeignKey
ALTER TABLE "Invite" ADD CONSTRAINT "Invite_createdById_fkey" FOREIGN KEY ("createdById") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

View File

@@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE "Invite" ALTER COLUMN "expires_at" DROP NOT NULL,
ALTER COLUMN "expires_at" DROP DEFAULT;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Image" ADD COLUMN "expires_at" TIMESTAMP(3);

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "User" ADD COLUMN "avatar" TEXT;

View File

@@ -0,0 +1,4 @@
-- AlterTable
ALTER TABLE "User" ADD COLUMN "oauth" BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN "oauthProvider" TEXT,
ALTER COLUMN "password" DROP NOT NULL;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "User" ADD COLUMN "oauthAccessToken" TEXT;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "User" ADD COLUMN "superAdmin" BOOLEAN NOT NULL DEFAULT false;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Image" ADD COLUMN "maxViews" INTEGER;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Url" ADD COLUMN "maxViews" INTEGER;

View File

@@ -0,0 +1,31 @@
/*
Warnings:
- You are about to drop the column `oauth` on the `User` table. All the data in the column will be lost.
- You are about to drop the column `oauthAccessToken` on the `User` table. All the data in the column will be lost.
- You are about to drop the column `oauthProvider` on the `User` table. All the data in the column will be lost.
*/
-- CreateEnum
CREATE TYPE "OauthProviders" AS ENUM ('DISCORD', 'GITHUB');
-- AlterTable
ALTER TABLE "User" DROP COLUMN "oauth",
DROP COLUMN "oauthAccessToken",
DROP COLUMN "oauthProvider";
-- CreateTable
CREATE TABLE "OAuth" (
"id" SERIAL NOT NULL,
"provider" "OauthProviders" NOT NULL,
"userId" INTEGER NOT NULL,
"token" TEXT NOT NULL,
CONSTRAINT "OAuth_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "OAuth_provider_key" ON "OAuth"("provider");
-- AddForeignKey
ALTER TABLE "OAuth" ADD CONSTRAINT "OAuth_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;

View File

@@ -0,0 +1,5 @@
-- DropIndex
DROP INDEX "OAuth_provider_key";
-- AlterTable
ALTER TABLE "OAuth" ADD COLUMN "refresh" TEXT;

View File

@@ -0,0 +1,8 @@
-- DropForeignKey
ALTER TABLE "Image" DROP CONSTRAINT "Image_userId_fkey";
-- AlterTable
ALTER TABLE "Image" ALTER COLUMN "userId" DROP NOT NULL;
-- AddForeignKey
ALTER TABLE "Image" ADD CONSTRAINT "Image_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;

View File

@@ -0,0 +1,2 @@
-- AlterEnum
ALTER TYPE "OauthProviders" ADD VALUE 'GOOGLE';

View File

@@ -0,0 +1,8 @@
/*
Warnings:
- Added the required column `username` to the `OAuth` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "OAuth" ADD COLUMN "username" TEXT NOT NULL;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "User" ADD COLUMN "totpSecret" TEXT;

View File

@@ -0,0 +1,26 @@
-- DropForeignKey
ALTER TABLE "InvisibleImage" DROP CONSTRAINT "InvisibleImage_imageId_fkey";
-- DropForeignKey
ALTER TABLE "InvisibleUrl" DROP CONSTRAINT "InvisibleUrl_urlId_fkey";
-- DropForeignKey
ALTER TABLE "Invite" DROP CONSTRAINT "Invite_createdById_fkey";
-- DropForeignKey
ALTER TABLE "Url" DROP CONSTRAINT "Url_userId_fkey";
-- AlterTable
ALTER TABLE "Url" ALTER COLUMN "userId" DROP NOT NULL;
-- AddForeignKey
ALTER TABLE "InvisibleImage" ADD CONSTRAINT "InvisibleImage_imageId_fkey" FOREIGN KEY ("imageId") REFERENCES "Image"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Url" ADD CONSTRAINT "Url_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "InvisibleUrl" ADD CONSTRAINT "InvisibleUrl_urlId_fkey" FOREIGN KEY ("urlId") REFERENCES "Url"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Invite" ADD CONSTRAINT "Invite_createdById_fkey" FOREIGN KEY ("createdById") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;

View File

@@ -0,0 +1,12 @@
/*
Warnings:
- A unique constraint covering the columns `[provider,oauthId]` on the table `OAuth` will be added. If there are existing duplicate values, this will fail.
- Added the required column `oauthId` to the `OAuth` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "OAuth" ADD COLUMN "oauthId" TEXT;
-- CreateIndex
CREATE UNIQUE INDEX "OAuth_provider_oauthId_key" ON "OAuth"("provider", "oauthId");

View File

@@ -0,0 +1,13 @@
/*
Warnings:
- You are about to drop the column `embedColor` on the `User` table. All the data in the column will be lost.
- You are about to drop the column `embedSiteName` on the `User` table. All the data in the column will be lost.
- You are about to drop the column `embedTitle` on the `User` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "User" DROP COLUMN "embedColor",
DROP COLUMN "embedSiteName",
DROP COLUMN "embedTitle",
ADD COLUMN "embed" JSONB NOT NULL DEFAULT '{}';

View File

@@ -0,0 +1,8 @@
-- AlterTable
ALTER TABLE "Image" RENAME COLUMN "created_at" TO "createdAt";
-- AlterTable
ALTER TABLE "Image" RENAME COLUMN "expires_at" TO "expiresAt";
-- AlterTable
ALTER TABLE "Image" RENAME COLUMN "file" TO "name";

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Url" RENAME COLUMN "created_at" TO "createdAt";

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Stats" RENAME COLUMN "created_at" TO "createdAt";

View File

@@ -0,0 +1,5 @@
-- AlterTable
ALTER TABLE "Invite" RENAME COLUMN "created_at" TO "createdAt";
-- AlterTable
ALTER TABLE "Invite" RENAME COLUMN "expires_at" TO "expiresAt";

View File

@@ -0,0 +1,19 @@
-- AlterEnum
ALTER TYPE "ImageFormat" RENAME TO "FileNameFormat";
-- AlterTable
ALTER TABLE "Image" RENAME TO "File";
-- AlterTable
ALTER TABLE "InvisibleImage" RENAME TO "InvisibleFile";
-- AlterTable
ALTER TABLE "InvisibleFile" RENAME COLUMN "imageId" TO "fileId";
-- AlterForeignKey
ALTER TABLE "InvisibleFile" RENAME CONSTRAINT "InvisibleImage_imageId_fkey" TO "InvisibleFile_fileId_fkey";
ALTER INDEX "InvisibleImage_imageId_key" RENAME TO "InvisibleFile_fileId_key";
-- AlterForeignKey
ALTER TABLE "InvisibleFile" RENAME CONSTRAINT "InvisibleImage_pkey" TO "InvisibleFile_pkey";
ALTER TABLE "File" RENAME CONSTRAINT "Image_pkey" TO "File_pkey";

View File

@@ -0,0 +1,8 @@
-- AlterTable
ALTER TABLE "File" ADD COLUMN "originalName" TEXT;
-- RenameForeignKey
ALTER TABLE "File" RENAME CONSTRAINT "Image_userId_fkey" TO "File_userId_fkey";
-- RenameIndex
ALTER INDEX "InvisibleImage_invis_key" RENAME TO "InvisibleFile_invis_key";

View File

@@ -0,0 +1,19 @@
-- AlterTable
ALTER TABLE "File" ADD COLUMN "folderId" INTEGER;
-- CreateTable
CREATE TABLE "Folder" (
"id" SERIAL NOT NULL,
"name" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
"userId" INTEGER NOT NULL,
CONSTRAINT "Folder_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "Folder" ADD CONSTRAINT "Folder_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "File" ADD CONSTRAINT "File_folderId_fkey" FOREIGN KEY ("folderId") REFERENCES "Folder"("id") ON DELETE SET NULL ON UPDATE CASCADE;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Folder" ADD COLUMN "public" BOOLEAN NOT NULL DEFAULT false;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "File" ADD COLUMN "size" INTEGER NOT NULL DEFAULT 0;

View File

@@ -0,0 +1,11 @@
/*
Warnings:
- You are about to drop the column `format` on the `File` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "File" DROP COLUMN "format";
-- DropEnum
DROP TYPE "FileNameFormat";

View File

@@ -0,0 +1,18 @@
-- CreateEnum
CREATE TYPE "ProcessingStatus" AS ENUM ('PENDING', 'PROCESSING', 'COMPLETE');
-- CreateTable
CREATE TABLE "IncompleteFile" (
"id" SERIAL NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"status" "ProcessingStatus" NOT NULL,
"chunks" INTEGER NOT NULL,
"chunksComplete" INTEGER NOT NULL,
"userId" INTEGER NOT NULL,
"data" JSONB NOT NULL,
CONSTRAINT "IncompleteFile_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "IncompleteFile" ADD CONSTRAINT "IncompleteFile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;

View File

@@ -0,0 +1,53 @@
/*
Warnings:
- A unique constraint covering the columns `[uuid]` on the table `User` will be added. If there are existing duplicate values, this will fail.
*/
-- PRISMA GENERATED BELOW
-- -- DropForeignKey
-- ALTER TABLE "OAuth" DROP CONSTRAINT "OAuth_userId_fkey";
--
-- -- AlterTable
-- ALTER TABLE "OAuth" ALTER COLUMN "userId" SET DATA TYPE TEXT;
--
-- -- AlterTable
-- ALTER TABLE "User" ADD COLUMN "uuid" UUID NOT NULL DEFAULT gen_random_uuid();
--
-- -- CreateIndex
-- CREATE UNIQUE INDEX "User_uuid_key" ON "User"("uuid");
--
-- -- AddForeignKey
-- ALTER TABLE "OAuth" ADD CONSTRAINT "OAuth_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("uuid") ON DELETE CASCADE ON UPDATE CASCADE;
-- User made changes below
-- Rename old foreign key
ALTER TABLE "OAuth" RENAME CONSTRAINT "OAuth_userId_fkey" TO "OAuth_userId_old_fkey";
-- Rename old column
ALTER TABLE "OAuth" RENAME COLUMN "userId" TO "userId_old";
-- Add new column
ALTER TABLE "OAuth" ADD COLUMN "userId" UUID;
-- Add user uuid
ALTER TABLE "User" ADD COLUMN "uuid" UUID NOT NULL DEFAULT gen_random_uuid();
-- Update table "OAuth" with uuid
UPDATE "OAuth" SET "userId" = "User"."uuid" FROM "User" WHERE "OAuth"."userId_old" = "User"."id";
-- Alter table "OAuth" to make "userId" required
ALTER TABLE "OAuth" ALTER COLUMN "userId" SET NOT NULL;
-- Create index
CREATE UNIQUE INDEX "User_uuid_key" ON "User"("uuid");
-- Add new foreign key
ALTER TABLE "OAuth" ADD CONSTRAINT "OAuth_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("uuid") ON DELETE CASCADE ON UPDATE CASCADE;
-- Drop old foreign key
ALTER TABLE "OAuth" DROP CONSTRAINT "OAuth_userId_old_fkey";
-- Drop old column
ALTER TABLE "OAuth" DROP COLUMN "userId_old";

View File

@@ -0,0 +1,16 @@
-- CreateTable
CREATE TABLE "Thumbnail" (
"id" SERIAL NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"name" TEXT NOT NULL,
"fileId" INTEGER NOT NULL,
CONSTRAINT "Thumbnail_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "Thumbnail_fileId_key" ON "Thumbnail"("fileId");
-- AddForeignKey
ALTER TABLE "Thumbnail" ADD CONSTRAINT "Thumbnail_fileId_fkey" FOREIGN KEY ("fileId") REFERENCES "File"("id") ON DELETE CASCADE ON UPDATE CASCADE;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "File" ALTER COLUMN "size" SET DATA TYPE BIGINT;

View File

@@ -0,0 +1,14 @@
-- CreateTable
CREATE TABLE "Export" (
"id" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
"complete" BOOLEAN NOT NULL DEFAULT false,
"path" TEXT NOT NULL,
"userId" INTEGER NOT NULL,
CONSTRAINT "Export_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "Export" ADD CONSTRAINT "Export_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;

View File

@@ -8,48 +8,168 @@ generator client {
}
model User {
id Int @id @default(autoincrement())
username String
password String
token String
administrator Boolean @default(false)
embedTitle String?
embedColor String @default("#2f3136")
images Image[]
urls Url[]
id Int @id @default(autoincrement())
uuid String @unique @default(dbgenerated("gen_random_uuid()")) @db.Uuid
username String
password String?
avatar String?
token String
administrator Boolean @default(false)
superAdmin Boolean @default(false)
systemTheme String @default("system")
embed Json @default("{}")
ratelimit DateTime?
totpSecret String?
domains String[]
oauth OAuth[]
files File[]
urls Url[]
Invite Invite[]
Folder Folder[]
IncompleteFile IncompleteFile[]
Exports Export[]
}
model Image {
id Int @id @default(autoincrement())
file String
mimetype String @default("image/png")
created_at DateTime @default(now())
views Int @default(0)
invisible InvisibleImage?
user User @relation(fields: [userId], references: [id])
userId Int
model Export {
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
complete Boolean @default(false)
path String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
userId Int
}
model InvisibleImage {
id Int
image Image @relation(fields: [id], references: [id])
model Folder {
id Int @id @default(autoincrement())
name String
public Boolean @default(false)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
invis String @unique
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
userId Int
files File[]
}
model File {
id Int @id @default(autoincrement())
name String
originalName String?
mimetype String @default("image/png")
createdAt DateTime @default(now())
size BigInt @default(0)
expiresAt DateTime?
maxViews Int?
views Int @default(0)
favorite Boolean @default(false)
embed Boolean @default(false)
password String?
invisible InvisibleFile?
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
userId Int?
folder Folder? @relation(fields: [folderId], references: [id], onDelete: SetNull)
folderId Int?
thumbnail Thumbnail?
}
model Thumbnail {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
name String
fileId Int @unique
file File @relation(fields: [fileId], references: [id], onDelete: Cascade)
}
model InvisibleFile {
id Int @id @default(autoincrement())
invis String @unique
fileId Int @unique
file File @relation(fields: [fileId], references: [id], onDelete: Cascade)
}
model Url {
id Int @id @default(autoincrement())
to String
created_at DateTime @default(now())
views Int @default(0)
invisible InvisibleUrl?
user User @relation(fields: [userId], references: [id])
userId Int
id String @id @unique
destination String
vanity String?
createdAt DateTime @default(now())
maxViews Int?
views Int @default(0)
invisible InvisibleUrl?
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
userId Int?
}
model InvisibleUrl {
id Int
url Url @relation(fields: [id], references: [id])
id Int @id @default(autoincrement())
invis String @unique
invis String @unique
urlId String @unique
url Url @relation(fields: [urlId], references: [id], onDelete: Cascade)
}
model Stats {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
data Json
}
model Invite {
id Int @id @default(autoincrement())
code String @unique
createdAt DateTime @default(now())
expiresAt DateTime?
used Boolean @default(false)
createdBy User @relation(fields: [createdById], references: [id], onDelete: Cascade)
createdById Int
}
model OAuth {
id Int @id @default(autoincrement())
provider OauthProviders
user User @relation(fields: [userId], references: [uuid], onDelete: Cascade)
userId String @db.Uuid
username String
oauthId String?
token String
refresh String?
@@unique([provider, oauthId])
}
enum OauthProviders {
DISCORD
GITHUB
GOOGLE
}
model IncompleteFile {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
status ProcessingStatus
chunks Int
chunksComplete Int
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
userId Int
data Json
}
enum ProcessingStatus {
PENDING
PROCESSING
COMPLETE
}

View File

@@ -1,31 +0,0 @@
import { PrismaClient } from '@prisma/client';
import { hashPassword, createToken } from '../src/lib/util';
const prisma = new PrismaClient();
async function main() {
const user = await prisma.user.create({
data: {
username: 'administrator',
password: await hashPassword('password'),
token: createToken(),
administrator: true
}
});
console.log(`
When logging into Zipline for the first time, use these credentials:
Username: "${user.username}"
Password: "password"
`);
}
main()
.catch(e => {
console.error(e);
process.exit(1);
})
.finally(async () => {
await prisma.$disconnect();
});

1501
public/adjectives.txt Normal file

File diff suppressed because it is too large Load Diff

1750
public/animals.txt Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 KiB

After

Width:  |  Height:  |  Size: 279 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -1,8 +0,0 @@
module.exports = {
branches: ['trunk'],
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/github',
'@semantic-release/changelog'
]
};

Some files were not shown because too many files have changed in this diff Show More