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
@@ -14,6 +14,8 @@ class AircraftExportsController < ApplicationController
|
||||
path = EXPORT_DIR.join("#{SecureRandom.hex(12)}.zip").to_s
|
||||
exporter.write_to(path)
|
||||
log_event("aircraft", "Aircraft exported (.sam.zip)")
|
||||
send_file path, filename: exporter.filename, type: "application/zip", disposition: "attachment"
|
||||
# Generic binary, not application/zip: Safari unzips zip downloads into a
|
||||
# folder ("Open safe files"), and the archive must stay one file to import.
|
||||
send_file path, filename: exporter.filename, type: "application/octet-stream", disposition: "attachment"
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user