My files attachement loss!!

Mr.Paichayon Chaiteerayanon asked on March 21, 2016 10:32

Dear Sir, I have problem about files attachment in document is loss! I tell you step by step as followed is: 1.My project has set basic work flow. 2.I found my database is large and i clear "AttachmentBinary" on Table [CMS_AttachmentHistory] by set this column is null. 3.When i edit and publish documnet. files attachement is loss!! Why? Can correct ? Please help me. Thank you.

Recent Answers


Dawid Jachnik answered on March 21, 2016 10:53

Hello,

Probably you storing attachments in the database, thath's why the AttachmentBianry column was very large. Clearing Attachment Binary equals also deleting attachments. Now you can only restore backup and change the storing space to File system. So by this your new attachments will be stored physically in the file system.

3 votesVote for this answer Mark as a Correct answer

David te Kloese answered on March 21, 2016 11:19 (last edited on March 21, 2016 11:19)

Hi,

As Dawid mentioned I hope you've made a Backup of your Database. It's advised to always be careful when editing your Database directly using SQL.

But 'CMS_AttachmentHistory' should only contain Attachments which you've deleted (updated version). Have you also 'cleaned' the 'CMS_Attachment' table?

Greets,

David

1 votesVote for this answer Mark as a Correct answer

artis anantachoke answered on March 22, 2016 08:01

As Mr.Paichayon Said, He storing attachment on a file system, not it db. When you apply basic workflow on your documents. Automatically, created version of document, So when you update CMS_AttachmentHistory on AttachmentBinary field to null. After that when you try to edit document, file attachment will be lost.

0 votesVote for this answer Mark as a Correct answer

Dennis Hulsmans answered on May 17, 2016 15:47 (last edited on May 17, 2016 15:48)

Hi artis

Did you check the IIS_IUSRS account access rights (modify & write) on your App_Data\VersionHistory folder. Your attachment version history is stored at this location: App_Data\VersionHistory\Attachments\ SiteName\PageId

Kind regards, Dennis

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.