mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
Exports download as one file: octet-stream (Safari no longer unzips them); importer accepts a re-zipped folder
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0fd795440d
commit
87d25f141a
5 files changed
+42
-6
No files matched your search
@@ -11,6 +11,8 @@ class RecordsPackagesController < ApplicationController
|
||||
path = dir.join("#{SecureRandom.hex(12)}.zip").to_s
|
||||
package.write_to(path)
|
||||
log_event("aircraft", "Records package downloaded")
|
||||
send_file path, filename: package.filename, type: "application/zip", disposition: "attachment"
|
||||
# Generic binary, not application/zip: Safari unzips zip downloads into a
|
||||
# folder ("Open safe files"); the package should stay one file to hand over.
|
||||
send_file path, filename: package.filename, type: "application/octet-stream", disposition: "attachment"
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user