diced / zipline

A ShareX/file upload server that is easy to use, packed with features, and with an easy setup!
https://zipline.diced.sh/
MIT License
1.32k stars 129 forks source link

Bug: Cannot access archives #270

Closed IceToast closed 1 year ago

IceToast commented 1 year ago

What happened?

When i upload archives like .rar or .zip files i cannot access them via the provided url.

When accessing the /u/ url you will get redirected to the /view route and find a 500 Error.

Version

upstream (ghcr.io/diced/zipline:trunk)

What browser(s) are you seeing the problem on?

No response

Zipline Logs

1|zipline  | TypeError: Cannot set properties of undefined (setting 'created_at')
1|zipline  |     at EmbeddedFile (/var/www/zipline/.next/server/pages/view/[id].js:192:22)
1|zipline  |     at renderWithHooks (/var/www/zipline/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
1|zipline  |     at renderIndeterminateComponent (/var/www/zipline/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5731:15)
1|zipline  |     at renderElement (/var/www/zipline/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5946:7)
1|zipline  |     at renderNodeDestructiveImpl (/var/www/zipline/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6104:11)
1|zipline  |     at renderNodeDestructive (/var/www/zipline/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6076:14)
1|zipline  |     at renderNode (/var/www/zipline/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6259:12)
1|zipline  |     at renderChildrenArray (/var/www/zipline/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6211:7)
1|zipline  |     at renderNodeDestructiveImpl (/var/www/zipline/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6141:7)
1|zipline  |     at renderNodeDestructive (/var/www/zipline/node_modules/react-dom/cjs/react-dom-server.browser.development.js:6076:14)
1|zipline  | Warning: A title element received an array with more than 1 element as children. In browsers title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering
1|zipline  |     at title
1|zipline  |     at head
1|zipline  |     at Head (/var/www/zipline/.next/server/chunks/56859.js:288:1)
1|zipline  |     at html
1|zipline  |     at Html (/var/www/zipline/.next/server/chunks/56859.js:676:104)
1|zipline  |     at MyDocument (/var/www/zipline/.next/server/pages/_document.js:24:1)
1|zipline  | warn  - You should not access 'res' after getServerSideProps resolves.
1|zipline  | Read more: https://nextjs.org/docs/messages/gssp-no-mutating-res
1|zipline  | warn  - You should not access 'res' after getServerSideProps resolves.
1|zipline  | Read more: https://nextjs.org/docs/messages/gssp-no-mutating-res
1|zipline  | warn  - You should not access 'res' after getServerSideProps resolves.
1|zipline  | Read more: https://nextjs.org/docs/messages/gssp-no-mutating-res
1|zipline  | warn  - You should not access 'res' after getServerSideProps resolves.
1|zipline  | Read more: https://nextjs.org/docs/messages/gssp-no-mutating-res
1|zipline  | warn  - You should not access 'res' after getServerSideProps resolves.
1|zipline  | Read more: https://nextjs.org/docs/messages/gssp-no-mutating-res
1|zipline  | warn  - You should not access 'res' after getServerSideProps resolves.
1|zipline  | Read more: https://nextjs.org/docs/messages/gssp-no-mutating-res
1|zipline  | warn  - You should not access 'res' after getServerSideProps resolves.
1|zipline  | Read more: https://nextjs.org/docs/messages/gssp-no-mutating-res
1|zipline  | warn  - You should not access 'res' after getServerSideProps resolves.
1|zipline  | Read more: https://nextjs.org/docs/messages/gssp-no-mutating-res
1|zipline  | warn  - You should not access 'res' after getServerSideProps resolves.
1|zipline  | Read more: https://nextjs.org/docs/messages/gssp-no-mutating-res
1|zipline  | warn  - You should not access 'res' after getServerSideProps resolves.
1|zipline  | Read more: https://nextjs.org/docs/messages/gssp-no-mutating-res

Browser Logs

No response

Additional Info

No response

diced commented 1 year ago

Fixed https://github.com/diced/zipline/commit/e94dd58542b773537eb049e76b6e2bb836e03564