All Questions
6 questions
24
votes
5
answers
19k
views
How to set value of file field with entity_metadata_wrapper
How do you set the value of a file field when using the entity_metadata_wrapper?
I've tried doing this in code:
$file = new stdClass();
$file->uid = 1;
$file->uri = $file_path;
$file->...
8
votes
2
answers
6k
views
Example of hook_file_download
How do I restrict the access to certain files based on their content type? I have the download section for registered users, and I want to prevent them to post links somewhere outside my site.
Is ...
3
votes
2
answers
1k
views
Image and other media file management
My question may seem vague but I'm confused and need advice on Drupal 7 media files management, so please bear with me. I'm looking for existing modules or ways to build the following functionality ...
1
vote
1
answer
1k
views
How to migrate fields attached to files?
I'm writing a file migration using migrate/migrate_d2d to migrate files from one Drupal 7 installation to another.
Images have custom fields attached to them, including a text field "...
1
vote
2
answers
531
views
Change values of nested fields with entity_metadata_wrapper
The background of this question is that I'm trying to migrate data from Drupal 6 Imagefield Extended to Drupal 7 File Entity (with File Entity Inline). See also https://www.drupal.org/node/974888
...
0
votes
0
answers
1k
views
Writing custom PHP code in Rules to check if a file field has a new value
I need to create a condition in Rules that evaluates whether a new file has been uploaded to afile field. The file field has an unlimited value setting and I need to send out notifications to users ...