The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Hot answers tagged

7

If you say the file record is correctly present in civicrm_file and civicrm_entity_file table, then only thing which is missing seems to be the entry for it in custom value table. To verify this yourself - Check the custom value table name mentioned in civicrm_entity_file (entity_table column). Open the above custom table and make sure it contains the ...


5

Contact Image URL is directly stored in civicrm_contact table, so I think if you have the URL which can display an image, you should be directly able to use the contact create API as below - $result = civicrm_api3('Contact', 'create', array( 'contact_type' => "Individual", 'first_name' => "first", 'last_name' => "last", 'image_URL' => "&...


5

CiviCRM files are never directly web-accessible. If you are also using Webform integration to submit the file, then a copy of the file is also stored in Drupal. You could either make your Drupal files private (this is a Drupal setting) or you could implement a hook to delete the files from Drupal after they are uploaded.


5

If you're using CiviCRM 4.7 or higher, you can find this location by going to Administer menu » System Settings » Directories. Click the blue circle with the question mark, and note the value for [civicrm.root]. See screenshot:


5

Yes, it did happen and it's called the "attachment" api. You can look up the docs for it in the api explorer:


5

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


4

A basic option to store a file is to create a custom field of type File. Not sure how well that plays though with webforms/views but easy enough to try.


4

One possibility is to use the Documents extension: https://civicrm.org/extensions/documents. This will allow you to add documents to contacts and show them on a separate tab.


4

It sounds like you're encountering CRM-17791. This bug was discovered and fixed in CiviCRM 4.7. I would recommend upgrading a test copy of your site to 4.7 to see if that resolves the issue. If so, consider upgrading or funding the long-term support team to backport a fix to version 4.6.


3

I would use the CiviRules extension, you could structure it something like - if registered participant of 'X' event, send email of 'X' template. With this you could just create an email template for each event within Civi with the links you would like them to access and it would automatically send to anyone who registers for the event.


2

Might justify developing a script or extension? The column uri in the database table civicrm_file seems to refer to these. The table civicrm_entity_file then links civicrm_file records to other existing entities. The column image_URL in the table civicrm_contact, on my transplanted legacy installation at least: in some cases contains absolute URLs that ...


2

We did end up using Documents - we added quite a few new features to it to extend its capabilities which you can read about here


2

There are different solutions as you suggested. One is using custom fields of the type file upload or use activities. There is indeed a document extension and this is one also capable of storing documents on a case. The advantage of the latter is that it could also store versions of the same document. It is not yet possible to search for documents on a ...


2

Preventing access to those files should be taken care of by .htaccess files. You should have .htaccess files under files/civicrm/ConfigAndLog, files/civicrm/upload, files/civicrm/custom with content: <Files "*"> Order allow,deny Deny from all </Files> What webserver are you using? Is this on a hosted environment or your own server? The ...


2

Sometimes you can get clue from .tpl file form view source page. The other option is to find the page callback of the the url. Each CiviCRM url defined in menu xml file has a callback. The page callback gives the clue which file is being invoked. For eg civicrm/activity/view If you a grep 'civicrm/activity/view' on CRM/ and open the xml file you will see ...


2

Another route to consider - add some custom fields to your Event entity, then you can put the url in to those fields, then you can set up a Sch Reminder that is using a token for the custom field, and bingo, each participant gets sent the links to the right document. Very light/easy solution. but i may still not have quite grasped the requirement :-) (note ...


2

I do this with our community, but we use Drupal and create an "organic group" for each event. We did some investigating of what it would take to migrate off Drupal and onto Wordpress, and group functionality was one of the difficult points. In Wordpress, the closest I have found to this is the Group plugin. You could create a group for each event. Then ...


1

Welcome empiguet. I do not use WP so much and I may not quite follow your workflow but I think you would need to do something as follows - if person registers then add to Smart Group - if in Smart Group, then set specific WP role (this may need an extra extension, i don't know if WP offers it, i do know Drupal does so an equivalent may exist) - set up WP ...


1

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 https://stackoverflow.com/questions/466521/how-many-files-can-i-put-in-a-...


1

You need to check the permissions on the hosting server for the directories in the warning. The directory permissions should be set to 0755, or it may show as 755. The files within the directories should show 0644, or 644.


1

You can use $civicrm_setting variable to over-ride your CiviCRM settings. You can find documentation here. To set extension directory you can use below snippet global $civicrm_setting; $civicrm_setting['Directory Preferences']['extensionsDir'] = '/var/www/html/trcbtp/drupal/sites/default/civicrm_extensions'; You can also use civicrm token variable for ...


1

see https://book.civicrm.org/user/current/organising-your-data/custom-fields/ under Multiple record fieldsets. you can set (only for contacts) multiple field records. aftewards you can set how the content should be displayed. i think you can do that with files too.


Only top voted, non community-wiki answers of a minimum length are eligible