-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Download of a ZIP seems to just concatenate content files #134
Comments
I'm not quite sure what you're trying to explain here, sorry. Send only supports uploading a single file. That's why, when choosing multiple files in the Send interface, or when selecting multiple files with Are you saying that something breaks when extracting such archive?
An image viewer might succeed in reading an image from the TAR archive. But you should extract the archive first instead. |
OK, let me make it a bit clearer. Here's the chronology to reproduce.
It's very odd. This only seems to apply if the ZIP was compressed in the browser rather than an existing ZIP being uploaded. |
I see. Does a file uploaded in this way fail to extract (on other platforms as well)?
It has been a while since I worked last with ZIP internals. I don't recall if there's a mode to concatenate files without applying compression, to simply merge all into a single file. There probably is. In any case, I'll take a look into it. |
Woah, you're right! I was able to reproduce this. I'm seeing the same on my Linux machine. This is super weird. I don't understand yet how something like this can happen. |
I believe I'm running into the same problem. Person A uploads a number of files to |
I am inspecting https://github.com/timvisee/send/tree/6ad2885a168148fb996d3983457bc39527c7c8e5/ (current master)… SendSend supports uploading multiple files. If so, it'll concatenate the contents into a stream, call it export default class Archive {
get name() {
return this.files.length > 1 ? 'Send-Archive.zip' : this.files[0].name;
}
get type() {
return this.files.length > 1 ? 'send-archive' : this.files[0].type;
}
// …
} ReceiveAfter downloading & decrypting the raw stream, the browser will check the manifest. If it's a let plainStream = this.keychain.decryptStream(blobStream(ciphertext));
if (this.fileInfo.type === 'send-archive') {
const zip = new Zip(this.fileInfo.manifest, plainStream);
plainStream = zip.stream;
size = zip.size;
}
// And convert `plainStream` to array buffer, … I search this repo and https://github.com/timvisee/ffsend-api, and find nothing related to API responsesExample Line 98 in 238f1f5
Multiple files: MetadataResponse {
metadata: V3 {
name: "Send-Archive.zip",
mime: "send-archive",
size: 52,
manifest: Manifest {
files: [
ManifestFile {
name: "a",
mime: "",
size: 26,
},
ManifestFile {
name: "b",
mime: "",
size: 26,
},
],
},
},
..
} Normal (single) files: MetadataResponse {
metadata: V3 {
name: "b",
mime: "application/octet-stream",
size: 26,
manifest: Manifest {
files: [
ManifestFile {
name: "b",
mime: "",
size: 26,
},
],
},
},
..
} |
Hi everyone! I've worked out #169 and timvisee/ffsend-api#82, and you can try it by: cargo install --git https://github.com/YDX-2147483647/ffsend.git --branch multi-with-api $ ffsend download https://…
Download & Decrypt …/… [==========] 100.00 % … KB/s
Download complete
Splitting... 👈 This infers that ffsend is downloaing multiple files. To revert: |
Currently using ffsend in Termux on Android to try to download some ZIPs. Seems to be the case that when I upload a ZIP, it downloads fine in the browser, but ffsend delivers the content files within the ZIP in a single unzipped file.
For instance, upload 1.jpg and 2.jpg in the browser. The resultant download in ffsend is a .zip which is actually just the two JPEGs concatenated. This amounts to being a valid JPEG as one of the two JPEGs, but which contains the data for both and is the according size.
Don't know if this is a problem on other platforms. But it's odd.
The text was updated successfully, but these errors were encountered: