-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(frontend): 拡張子内にドットが含まれるものを正常にアップロードできるように #13699
base: develop
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #13699 +/- ##
============================================
+ Coverage 66.46% 77.91% +11.45%
============================================
Files 988 185 -803
Lines 116719 25566 -91153
Branches 4511 487 -4024
============================================
- Hits 77572 19920 -57652
+ Misses 39116 5639 -33477
+ Partials 31 7 -24 ☔ View full report in Codecov by Sentry. |
対応必要? |
|
filename.xxx.yyy が aaaaaaa.yyy になって困ること少ない気もする |
困る場合は設定をオフにするとか |
例外の拡張子を列挙するのは管理が面倒になるからあまりやりたくないわね |
例えば aaaa.jpg.webp とかは結局webpだから bbbb.webp になっても問題ないし |
(個人的にはそもそもドライブに |
ピリオドでsplitした最初だけ置き換えるのはダメなのかしら |
いまそうなってるはず |
であれば
は起きえない気がした |
@@ -45,7 +71,7 @@ export function uploadFile( | |||
const reader = new FileReader(); | |||
reader.onload = async (): Promise<void> => { | |||
const filename = name ?? file.name ?? 'untitled'; | |||
const extension = filename.split('.').length > 1 ? '.' + filename.split('.').pop() : ''; |
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.
今の実装はこれ
あ、そうじゃなかった |
ただそうなった場合 |
一般的にファイルシステムにおけるファイル名に拡張子を意味する目的以外でピリオドって使われるものなのかしら |
許容されないわけではないのでまずそう |
非常に稀な気がするけどどうなのかしら(特に英語圏) |
ユーザーがどんなファイル名のファイルをアップロードするかはこちらでコントロールできることではないのでユーザーの行動を信用しないほうが良い気はする |
ファイル名に日付が入っているケース(例 |
🤯 |
What
ランダム文字列でアップロードする際に、
tar.gz
など、拡張子内にドットが含まれるファイルの拡張子が正常に処理されない問題を修正Why
Fix #13688 (comment)
Additional info (optional)
Checklist