-
Notifications
You must be signed in to change notification settings - Fork 144
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
Upload Pipeline v2 #5905
Merged
Merged
Upload Pipeline v2 #5905
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TimWolla
reviewed
May 6, 2024
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.
Some remarks from looking at the diff. Didn't attempt to understand the relation between the different parts. Feel free to disregard anything that doesn't make sense or anything you disagree with.
wcfsetup/install/files/lib/data/attachment/Attachment.class.php
Outdated
Show resolved
Hide resolved
wcfsetup/install/files/lib/data/file/temporary/FileTemporary.class.php
Outdated
Show resolved
Hide resolved
wcfsetup/install/files/lib/data/file/temporary/FileTemporary.class.php
Outdated
Show resolved
Hide resolved
wcfsetup/install/files/lib/system/endpoint/controller/core/files/upload/PostChunk.class.php
Outdated
Show resolved
Hide resolved
dtdesign
force-pushed
the
upload-pipeline-v2
branch
from
May 12, 2024 10:24
fdb689f
to
1da6e81
Compare
TimWolla
reviewed
May 12, 2024
10 tasks
TimWolla
reviewed
May 21, 2024
wcfsetup/install/files/lib/system/file/processor/AttachmentFileProcessor.class.php
Outdated
Show resolved
Hide resolved
There is no need to track each chunk because we can simply use the file system as the single source of truth.
Allow for up to 255 chunks and track the state of each uploaded chunks. The `chunks` property is effectively a bitmap whose length represents the number of chunks
This avoids having to buffer the data into separate files which causes a lot of I/O when stitching the file together.
This partially reverts the changes made in bde83e6
The checksum is computed based on the configuration of the thumbnail, allowing to detect when a thumbnail needs to be regenerated. If the checksum matches, the file hash is checked instead to detect damaged files.
dtdesign
force-pushed
the
upload-pipeline-v2
branch
from
June 8, 2024 10:20
8a3a8c6
to
82fe21f
Compare
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Missing parts:
objectTypeID
.message
property. This might also require some updated CSS to work nicely with the grid layout.IFileProcessor
that allows us to easily expand the interface later.Attachment/List.ts
handles too much logic and should offload some intoAttachment/Entry.ts
which is unused right now.ReadableStream
in the request body offetch()
. This means that we cannot track how much data has been sent to the server already. We can still track the chunks but that might be a bit light and potentially misleading due to how different the size of chunks can be for smaller uploads. (UPDATE: The decision was made to ignore this for now. Due to the extreme differences in the values forpost_max_size
this can differ widely.)<woltlab-core-file-upload>
does not support limiting the number of concurrently uploaded files yet.Closes #5668