It's not possible to upload a pdf to an existing
document afterwards.
Recreation procedure:
Project -> Document -> new document ->
Add any word document (or whatever you like), but
don't enter the pdf path.
Save this document. Verify it's there. Click on the
document, and you see an input field for a pdf file,
with browse and add button.
Use browse to select a file and press add. After a
while (The browser shows a progress bar on the status
line) the original screen is back and the pdf is NOT
uploaded. No errors in the log file.
The same doc and pdf in one go (entring both the .doc
and the .pdf) works oke.
Too bad.... I have a lot of submitted docs that need a
pdf added afterwards.
Thanks, Martin.
Logged In: YES
user_id=608879
Oke, I fixed this.
The behaviour is because the php.ini setting
"register_globals=Off". You need to access variables in
another way (as documented), so I made a modification to
opt/documents/Doc_View/index.php to use the workaround,
that's used in other parts of OPT as well. Here's the diff:
diff index.php.org index.php
67a68,69
> $pdf_name = $_FILES['pdf']['name'];
> $pdf_tmp_name = $_FILES['pdf']['tmp_name'];
70c72
< if (is_uploaded_file($pdf))
---
> if (is_uploaded_file($pdf_tmp_name))
72,73c74,75
< $data_big=OPT_runtime_slashes(fread(fopen($pdf, "rb"),
< $fsize=filesize($pdf)));
---
>
$data_big=OPT_runtime_slashes(fread(fopen($pdf_tmp_name, "rb"),
> $fsize=filesize($pdf_tmp_name)));
Hope this makes it into the next official release.
Martin.
Logged In: YES
user_id=22084
Thanks for reporting this. I've committed a fix which will
be available in the next release.