-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Conversation
R+ on the string |
max_file_size: { | ||
format: Number, | ||
default: (1024 * 1024 * 1024) * 2, | ||
env: 'P2P_MAX_FILE_SIZE' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we were removing all "P2P" references - rename?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeeeaaaah, i wanted to rename them all at once, but not in this PR, so... 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but it's a new variable, is it not? unless you have an .env file that I am unaware of?
}, | ||
max_file_size: { | ||
format: Number, | ||
default: (1024 * 1024 * 1024) * 2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment about what real-world value this is? I assume its 2GB.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments always tend to diverge from reality. do the math 💪
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both hard limits are the same. the recommendation is just a suggestion
frontend/src/download.js
Outdated
`${filename} (${(progress[0] / 1000000).toFixed(1)}MB of ${(progress[1] / 1000000000).toFixed(1)}GB)` | ||
); | ||
} | ||
$('.progress-text').text(`${filename} (${bytes(progress[0])} of ${bytes(progress[1])})`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this may be causing some UI jank as well. You can see in the following UI screenshot that the filesizes are rounded to 2 decimal places. I think in some cases during upload, it's rounding the ".00" to ".0" which causes the UI to slightly shift very briefly.
This may all be academic though since I believe @johngruen also has a PR to tweak the UI, so not sure who's PR will "win".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, we might be able to close some error handling server side
bugs with this.
Fixes #180
bytes
module cuz im lazy