[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 410
  • Last Modified:

Error message "the file is damaged and could not be repaired"

Hi,

I need your help please.

In my coldfusion code, I have my project to upload any type of documents but for some reason .pdf and .msg gives me an error that says "There was an error opening this document. The file is damaged and could not be repaired"

I am not sure why the project open up .doc or any other files fine but the .pdf and .msg

Thanks,
Lulu
0
lulu50
Asked:
lulu50
  • 3
  • 2
1 Solution
 
gdemariaCommented:
Are you saving these files into the database?   If so, perhaps the pdf and msg files are larger than the .doc files and they are getting cut-off.   There is a setting in the /CFIDE/administrator to only fetch a limited string size, perhaps you are exceeding it with these file types.  

The setting is under "Advanced Settings" for your data source definition and is called LONG TEXT BUFFER or BLOG BUFFER
0
 
lulu50Author Commented:
gdemaria,

Yes, I am saving the files to the database.

the file size of the .pdf is the same as the .doc file

what is the data source definition?

FileID      int      Unchecked
IssueID      int      Checked
FileName      varchar(255)      Checked
Description      varchar(255)      Checked
UploadedFile      varchar(MAX)      Checked
Status      int      Checked
uploadedasbinary      varbinary(MAX)      Checked
CreatedDate      datetime      Checked
0
 
gdemariaCommented:
The data source definition is the place in the CFIDE/Administrator where you define the datasource which points to your database.   Click on the datasource and then the advanced options to see this field.   The setting limits the amount of data that will be fetched from the database.    I ran into this problem when opening large data, it literally truncates the data fetched, sounds like that is what is happening to you.
0
 
lulu50Author Commented:
gdemaria,

Thank you for your help.  That was the problem!!!!!
0
 
lulu50Author Commented:
Thank you
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now