Answers.Body: <p>As the files are stored on disk, their size is not a significant issue, as @Xavier mentions in his answer. However, retrieving the files becomes slow at the operating system level in linux if you have a very large number files in the same directory - see answers 2 and following of <a href="https://stackoverflow.com/questions/466521/how-many-files-can-i-put-in-a-directory">https://stackoverflow.com/questions/466521/how-many-files-can-i-put-in-a-directory</a>. Choosing the type of file system for the disk drive you store the files on can have a dramatic impact on performance (<a href="https://unix.stackexchange.com/questions/28756/what-is-the-most-high-performance-linux-filesystem-for-storing-a-lot-of-small-fi">https://unix.stackexchange.com/questions/28756/what-is-the-most-high-performance-linux-filesystem-for-storing-a-lot-of-small-fi</a>). Probably easiest optimization is to pay for an SSD drive rather than a HDD.</p>
  
  <p>Separately, you may want to search these files both by content and by contact name. Consider using <a href="https://github.com/civicrm/apachesolr_civiAttachments" rel="nofollow noreferrer">https://github.com/civicrm/apachesolr_civiAttachments</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-05T23:19:20.167Z
Answers.LastActivityDate: 2016-04-05T23:19:20.167Z
Answers.LastEditDate: 2017-05-23T12:38:59.763Z
Answers.UserDisplayName: Joe Murray
Answers.Body: <p>the files are stored outside of civi database, the database itself contains only the file name, it shouldn't be a problem</p>
  
  <p>However, did you think about using a "real" document management system (ie. one that offer full search on the documents and revision and whatelse) and integrate it with civi? given the quantities you expect, might be easier for the users</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-04T14:59:12.150Z
Answers.Text: I've been fiddling with attachments recently. Might want to consider how it sanitises filenames too- CRM_Utils_File::makeFileName and cleanFileName strip anything non-alphanumeric (including spaces), you won't necessarily ever be able to get back the original filename.
Answers.UserDisplayName: DaveFF
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-04T13:55:33.367Z
Answers.LastActivityDate: 2016-04-04T13:55:33.367Z
Answers.UserDisplayName: Xavier
Body: <p>We have a client who is looking to upload about 5G per year of files onto client records in CiviCRM. </p>
  
  <p>We can obviously arrange for the server to manage that, but wondered if anyone has ever notice speed issues with uploading so many files? They need to keep records for 7 years, so will eventually have around 35G of files attached to activities.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-11-01T05:15:48.377Z
Comments.Text: have you checked out https://github.com/CiviCooP/org.civicoop.documents
Comments.UserDisplayName: petednz - fuzion
Tags: <attachments><files>
Title: File Storage on CiviCRM
ThreadText: # File Storage on CiviCRM
  
  (Asked by: username_0 on 2016-04-04)
  
  We have a client who is looking to upload about 5G per year of files onto client records in CiviCRM.
  
  We can obviously arrange for the server to manage that, but wondered if anyone has ever notice speed issues with uploading so many files? They need to keep records for 7 years, so will eventually have around 35G of files attached to activities.
  
  **Tags:** attachments, files
  
  > **Comments:**
  > **username_1**: have you checked out https://github.com/CiviCooP/org.civicoop.documents  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2016-04-04. Score: 5 | Accepted answer
  
  the files are stored outside of civi database, the database itself contains only the file name, it shouldn't be a problem
  
  However, did you think about using a "real" document management system (ie. one that offer full search on the documents and revision and whatelse) and integrate it with civi? given the quantities you expect, might be easier for the users
  
  > **Comments:**
  > **username_4**: I've been fiddling with attachments recently. Might want to consider how it sanitises filenames too- CRM_Utils_File::makeFileName and cleanFileName strip anything non-alphanumeric (including spaces), you won't necessarily ever be able to get back the original filename.  
  
  ---
  
  ### Answer by username_2 on 2016-04-05. Score: 1
  
  As the files are stored on disk, their size is not a significant issue, as @username_3 mentions in his answer. However, retrieving the files becomes slow at the operating system level in linux if you have a very large number files in the same directory - see answers 2 and following of <https://stackoverflow.com/questions/466521/how-many-files-can-i-put-in-a-directory>. Choosing the type of file system for the disk drive you store the files on can have a dramatic impact on performance (<https://unix.stackexchange.com/questions/28756/what-is-the-most-high-performance-linux-filesystem-for-storing-a-lot-of-small-fi>). Probably easiest optimization is to pay for an SSD drive rather than a HDD.
  
  Separately, you may want to search these files both by content and by contact name. Consider using <https://github.com/civicrm/apachesolr_civiAttachments>.
  
  
  ---
  
  