Hello,
What i am doing is retrieving BLOB field from the database, modifying the header so it would be downloaded, the contents of these fields are PDF or DOC files.
I had the files downloaded from modx corrupted but from a static php files works fine, after troubleshooting for so long doubting the headers, i found out with wire-shark the below:
The problem is when a file contains an image the image is usually between square brackets which modx assumes they are snippets try to process them and fails so this part is stripped out from the file, causes the file to be without the image and in most cases gets corrupted.
My question is: How can i force modx to output these files without processing the square brackets? usually when i want to display square brackets in the output i use
<pre><html><body><pre><span>[</span><span>[</span>TEXT[[data]]<span>]</span><span>]</span></pre>
which corrupts the file.
Update:
To workaround this issue i zipped the file on the fly, however it is just a workaround and not a solution
[ed. note: mina_gerges last edited this post 13 years ago.]