I have a question regarding merging files on a remote site. Let's say there are 2 files stored at the following locations:
http://example.com/path/to/file1.txt
http://example.com/path/to/file2.txt
Is it possible to merge these files before allowing the user to download them?
File 1: file1.txt
This is the content in file1.txt
File 2: file2.txt
But this is the content in file2.txt
Merged File: merged_file.txt (The file that will be presented to the user for download)
This is the content in file1.txt
But this is the content in file2.txt
Follow-up Questions:
- If the remote files have
Content-Disposition: attachment
as a header, is it still possible to merge them? - If merging is not feasible, can the files be combined into a single downloadable ZIP file instead of multiple text files?