Repository navigation
Archives: extract and compress local files, extract downloads when they finish - #175
Merged
Merged
Conversation
… when they finish - /api/v1/local/archives: info, entries, extract and compress (zip, rar, 7z, tar, gz, bz2, xz, zst and multi-volume sets), run in the background one at a time, with progress on /api/v1/archive-operations and ArchiveProgress. - Extraction never writes outside the destination, never creates links and stops before the disk is full; password, missing volume, damaged and unsupported archives fail with a code. - extractArchives / deleteArchivesAfterExtract / archivePassword on the download endpoints: archives are extracted when their download (every volume of a set) finishes; the flag survives a restart, the password does not. - POST /api/v1/transfers/downloads now puts the files under the local root (the target path was used as is, outside it). - Capabilities local.archives and transfers.autoExtract; 7-Zip in the Docker image (INCLUDE_7ZIP) to create .7z.
…en they finish - Local files: Extract... (with the archive contents, password, existing files policy, delete afterwards) and Compress... (zip, 7z, tar.gz). - Download to the server (channels and chat): option to extract the archives when they finish and delete them afterwards. - Progress cards next to the delete ones (also for the automatic extractions) and in the transfers popover.
This file contains hidden or 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
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.
Compress and extract the server's local files, and extract archives automatically when a download from Telegram finishes (optionally deleting them).
Server
.part1.rar,.r00,.7z.001,.z01). Any volume works; the first one is found in the folder. SharpCompress (MIT), sequential reading for solid 7z/rar, stream reading for compressed tars.INCLUDE_7ZIP=falseleaves it out. Written as.partialand renamed when complete; a taken name gets " (1)".POST /api/v1/local/archives/extract|compress,POST .../entries(list without extracting),GET .../info./api/v1/archive-operations(list, get, cancel) andArchiveProgresson/hubs/events, throttled likeDeleteProgress...are not written.password_required,wrong_password,not_enough_space,missing_volume,unsupported,corrupt,not_found,tool_missing.extractArchives,deleteArchivesAfterExtract,archivePasswordonPOST /api/v1/transfers/downloadsand/messages.password_requiredand is kept.POST /api/v1/transfers/downloadsusedtargetPathas is. A relative folder ended up outside the local root, and with no folder files went to the filesystem root. It is now resolved under the local root, and "keep the channel folders" reproduces them there.local.archives,transfers.autoExtract.Web
Checks