Document (Database) Field Type Issue

I have a form including Document(Database) Field Type.
When I’m adding a record with a pdf type document everything goes well.
After updating , I 'm trying to view the record it is ok too but when I try to view the pdf document, after download I got an error " the file is damaged and could not repaired."

Any suggestion ?

Thanks,

Check your field type for the database column. It should be a type that does not convert the data, e.g. CLOB in oracle would be a wrong type, BLOB would be correct.
BLOB would be corretc in mysql, TEXT would be wrong.

It is BLOB type of course. I checked it. The error only occurs for pdf files. Word or other types are OK. I couldn’t find why pdf files raises this error.

The same error also occurs in the Project Management Sample on Scriptcase Website.
You can see the error simply uploading a pdf file from the “add document” form.

Could you look into the html header? Might have a wrong reference. Does it do that on different pc’s? It might be that the filetype is bound to the wrong reader.

It is the same on a different PC.
Can you please try it on from link ?
Add a new pdf document ?

http://www.scriptcase.net/scriptcase-samples/php-systems/project-management/

Could you describe what to do to reproduce? It’s refering to a demo of scriptcase. I guess that they will not allow us to upload anything at all…

In this demo application, please logon as an admin.
From the menu select Document Library… Add Document…
Upload a pdf file as an document.
After posting the record, find the document using the same menu.
Try to view the pdf document attached with the record.
You can see the error .

This occurs only with pdf files.

I try it creating the same demo application on my server.
The result is the same.

Exact … Upload failed with any file.

If you have the app running locally, did you apply the allowed filetypes? The samples are exactly the once on their site, so that’s the reason why it won’t work I think.

I’m using it on a webserver provided by a hosting firm (hoo.st ).
I create the sample application on my server. Also I did an application myself using the Document Field Type.
The result is the same.

There is a problem with ONLY pdf files. Other file types are OK.
I couldn’t find so far a reasonable cause for this error!