Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

LargeFileUploadTask.resume() may update rangesRemaining but does not handle modifying the InputStream accordingly

オープン
#2,503 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java
領域
api

調査の方向性

まず LargeFileUploadTask.resume()、updateSessionStatus()、upload() の場所を特定し、再作成されたアップロードセッションを再開した後に rangesRemaining と提供された InputStream がどのように使用されるかを追跡します。Android 上または同等のテストで、部分的にアップロードされたセッションのシナリオを再現します。完了条件は、再開されたアップロードが正しいストリーム位置を使用するか、アップロード前に更新された範囲を明確に公開することです。

索引モデルが issue の本文から書いたものです。

説明

status:waiting-for-triage type:feature
Is your feature request related to a problem? Please describe the problem.

I may be misunderstanding something about the SDK but her is my problem.

Im using Android and com.microsoft.graph:microsoft-graph:6.54.0. If I recreate an upload session where the LargeFileUploadTask had uploaded som of the file, and use it to recreate a LargeFileUploadTask and call resume() internally the SDK calls updateSessionStatus() and may update rangesRemaining. However it does not modify my provided InputStream based on this. So when it calls upload() and slices are later created for upload it uses the wrong data and the resulting file is corrupted.

I can not prepare the InputStream because I do not know what rangesRemaining is going to be (hence resume is asking the API) so the only way around it I can see is using updateSessionStatus() myself, adjust the InputStream and call upload() instead.

This works but is what I would assume the resume() function to handle.

Describe the solution you'd like.

It would be good if the resume function could handle the InputStream itself.

If that is not possible maybe provide some way, like a callback in resume(), where I get the new session with potentially new rangesRemaining and can modify my InputStream before the internal upload() call.

Or provide more information in the javadoc so future users do not run into the same wrong assumptions about InputStream handling I did.

Or remove/hide resume() removing the temptation to use it. It seams dangerous for it to ask the API for a new correct range with no way for the developer to act on it before uploading starts.

Additional context?

No response

主要言語
Java
スター
444
フォーク
154
平均マージ
18時間 28分
マージ済み PR(30日)
4

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoftgraph/msgraph-sdk-java のほかの issue

microsoftgraph/msgraph-sdk-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。