Questions relating to files, both public and private including the file_managed database table

learn more… | top users | synonyms

0
votes
0answers
5 views

managed_field from theme in Domain Access

I created custom theme with some additional settings in it. Everything works fine when I change theme settings globally, but when I try to remove managed_file field's file (image) in the theme ...
0
votes
2answers
21 views

How to access and edit files from admin panel?

How i can acces my files without going to host control panel or by ftp. I mean if any module is for that to access and edit files from Admin panel.
0
votes
2answers
36 views

How to show fid with slideshow image

I have very specific requirement. I want to show images in slideshow. I have created content type "User Slideshow Snaps" and two fields Slideshow Snaps Node Id I want to show slieshow of images ...
0
votes
0answers
18 views

Add files to private directory?

I have set my "Private file system path" for uploaded private files (admin/config/media/file-system), but I am confused as to how to add any files to that directory. I expected to find a private files ...
0
votes
0answers
17 views

Display a file by different users

I have a problem when i want to see a file uploaded.I created a managed_file like this : $form['document']['footer_file'] = array( '#name' => 'footer_picture', '#title' => t('Footer ...
0
votes
0answers
21 views

URL variable getting lost when using upload button on a managed file

I have a D7 form that I made using the form API. The URL to the form contains a URL variable like so www.mysite.com/myform?id=123456. (I know it would be better to do www.mysite.com/myform/123456, but ...
0
votes
1answer
34 views

Files in the file_managed table with status of 0, not deleting on cron

I have a form where I am uploading files to the "sites/default/files" directory. I am using the managed_file type in my form API definition. This is all working fine and I notice that in the ...
0
votes
0answers
20 views

Uploaded files are not showing correctly in some users

Uploaded files are not showing correctly in drupal 7.12. However this issue occurs only with some old users and newly created users are working fine. what might be the cause of the issue. Can anybody ...
0
votes
0answers
12 views

exif custom mapped fields not filled with entity translation

We are filling custom fields in file entities with data from IPTC tags in images on upload. For that we are using exif_custom. Since we are using entity_translation the exif_custom mapped fields with ...
0
votes
2answers
16 views

file_usage_add issue for compound field

I have created a custom compound field which contains a managed_file element in the field widget form. The issue I am having is not with saving the file, but with adding the file usage information. ...
0
votes
0answers
9 views

How to manage file removals manually when using 'managed_files'?

I learned about FILE_STATUS_PERMANENT and file_usage_add recently in a custom module. My question now is what do I need to do to handle changes to the files in this module. If a user removes the ...
1
vote
0answers
44 views

How to populate a managed file field with ajax

Problem I have a large form with a select field tied to an ajax call. When an option is selected a large chunk of the form is rebuilt and a number of fields re-populate. All the fields pre-populate ...
2
votes
2answers
69 views

Custom module 'managed_file' variable info keeps disappearing

I have a custom module which allows a 'managed_file' upload in the settings/config page. This works fine and displays as expected after uploading (with the filename linked, and a "Remove" submit ...
1
vote
0answers
18 views

“managed_file” type element not showing in my custom block configure form

I have been creating a portfolio section for my one page theme and I created a module for these section blocks. Now, I'm using the hook_block_configure to set the data into the blocks. Only 1 ...
0
votes
1answer
30 views

I want to call a mymodule.functions.inc file

Hi all drupalers i am new in drupal coding i wrote a new drupal module that works perfecr but my boss wanted to put all my functions of my .module file in a new folder called 'includes' and in a files ...
0
votes
0answers
28 views

Problem with function from theme-settings.php in sub-theme

I want to create the sub-theme of my custom theme but I have the problem with the function from theme-settings.php. I have a few managed_file fields in my theme settings and my submit function for ...
0
votes
0answers
69 views

Unzip a file in Drupal 7 Form API and upload extracted files

I'm creating a custom form using Drupal 7 Form API, and I need my users to be able to select a ZIP file containing a number of other files. I'd like to be able to extract the files and then upload ...
1
vote
1answer
80 views

'Media File Selector' blank screen

To use already existing image, I choose 'Media File Selector' Widget. But, it gives me blank page like this when I click on 'Library' to choose already existing image in Drupal-7. Version of the ...
1
vote
0answers
71 views

Attach multiple files to a node on node_insert and move them to private directory

I used the code below to save files and attach them to the node on node_insert, but the problem only the last file is saved and attached to the node : function MYMODULE_node_insert($node){ // ...
1
vote
2answers
16 views

Forcing file migration after deleting field

I have a situation where I am working on Drupal 6 to Drupal 7 migration. The migration is being done in stages, and stage one is now live. I am working on stage 2, and have run into a snag file file ...
0
votes
0answers
35 views

Can't make managed_file field to work

I added the file field for the image in theme settings and created variable in template.php file, but I can't make it work and I'm not able to upload the image file (after uploading the page refreshes ...
0
votes
1answer
105 views

How to set the file status of files uploaded through Drupal 7 theme settings to permanent

I have been trying for a week to get image files uploaded to a Drupal server through the use of "managed_file" theme settings to remain on the site longer than the default 6 hours. I have visited the ...
0
votes
0answers
100 views

Copy files from remote URL to S3 via s3fs module stream wrapper

In the process of upgrading a news site from D6 -> D7, I'm upgrading a custom module that imports Associated Press stories from their feed that we subscribe to, and part of the process involves ...
0
votes
0answers
23 views

file_managed vs files tables

I am attempting to add a file to a node. I am using the following code which is saving the file to the file_managed table in Drupal without issue: //query old DB for the pieces of the file I need ...
0
votes
0answers
164 views

How to display a thumbnail of uploaded images when viewing a webform submission?

When a user is filling out a webform I managed to show a thumbnail when uploading an image using the theme_file_link hook as described in the drupal forums: function mytheme_file_link($variables) { ...
0
votes
1answer
9 views

file_entity update means views now checks for public: in their uri?

Since a recent update, I think Views must have changed the way it links in relationships to file fields. Now the SQL includes a WHERE clause like this: EXISTS ( SELECT fm_access.fid AS fid FROM ...
0
votes
1answer
26 views

I can't remove an manage_file field image

I have the next managed_file field: $form['portada_field']['imagen_portada'] = array( '#title' => t('Imagen'), '#type' => 'managed_file', '#description' ...
1
vote
1answer
76 views

Adding accept attribute to managed_file field to specify file types client-side

I've got a file field in a custom form like this: $form['image_upload'] = array( '#type' => 'managed_file', '#title' => t('Image upload'), '#description' => t('Upload png ...
1
vote
2answers
128 views

How might I have Webforms save files to private file system or as a database blob?

In Drupal 7, I have the file system configured as In the code for the Webforms' file component located at sites/all/modules/webform/components/file.inc, it appears that one could easily change it ...
0
votes
0answers
20 views

Is there any core or module functionality that automatically corrects URLs in node content bodies?

Background I'm investigating some odd behaviour on a Drupal 7 website. We're using the upload replace module to turn Drupal's file versioning on its head. However, there's a bug with this module ...
0
votes
0answers
53 views

How to debug missing form field?

My content type has a field_file (managed file). Problem is that the file is only visible to person who uploaded it. I upload the file as UID 1 and can't see it as normal admin. The field is there in ...
0
votes
0answers
25 views

Problem in theme-settings trying to save and modify file drupal 7

I have downloaded a template and what i want to achieve is that i can upload a file from the template option without using the ftp client. I have three slideshows and the code that i have implemented ...
0
votes
0answers
31 views

How to change file field destination

i'm using Drupal 7 and have an article content type with a file field for article pdfs (field_pdf_file). Currently this field points to the Drupal 7 private file system so uses the stream private:// . ...
0
votes
0answers
124 views

Replace the file with same name

With reference to post for the validation function in managed_file field, but i am facing an issue with file_desitination() $file->destination = ...
0
votes
0answers
43 views

Temp images still aren't being saved in custom module form

I have what appears to be an expected issue with Drupal 7 in my custom module. My temp images are removed every few hours when the system_cron() function runs. I am, however, using a form submit ...
1
vote
1answer
163 views

Why does managed_file not respect the #upload_location?

I've got a managed_file, with an #upload_location set to 'public://uploads'. When I upload files using the managed_file form element, uploaded files get copied to the 'public://' root, but not the ...
0
votes
0answers
46 views

Disable transfer file (managed_file) until form is validated correctly

How to disable transfer file from custom form to server (managed_file) until form is validated correctly i have 10 required fields on form and 1 more field is: $form['picture_upload'] = array( ...
0
votes
0answers
45 views

custom entity admin page integrity constraints violation of managed_file in 'remove' process

I am developing a custom entity administrative page. The custom entity makes use of managed files. This is by storing a foreign key of file_id that references the file id in "file_managed" table. ...
0
votes
0answers
138 views

Clear managed_file field on submit

I'd like to clear the managed file field each time the contents are sent off for further processing on submit. The callbacks work fine, but I have repeatedly come unstuck in my goal of having a ...
0
votes
0answers
29 views

Print out multiple upload fields on a page

I'm trying to output 4 upload fields on a page. But the problem is that it only outputs the first one and not the rest. All works fine when uploading the files with Drupal's form api, but I just can't ...
2
votes
1answer
4k views

How to attach Dropzone.js uploads to a form element

I'm integrating dropzone.js into my form, but I have an issue regarding my file uploads. I have my dropzone set up, and file uploads are in the $_FILES array. I want to call file_save_upload to ...
0
votes
2answers
202 views

How to debug missing default value of managed file?

I have a form with images. It also contains title and alt for 3 languages, so when I select them in one query, I get the same managed file fid 3 times. But that's not the problem. Relevant part of ...
0
votes
1answer
122 views

Programmatically add PDF file to user

So using the 'file' module i have added a field to the user table called 'user_files'. What i want to know if how can i programmatically add a file to the user, so that it is displayed on the users ...
1
vote
0answers
3k views

How to change 'upload' and 'choose file' text that generates form type managed_file

$form['cv'] = array( '#type' => 'managed_file', '#title' => t('Vaš CV'), '#default_value' => '', '#progress_message' => t('Molimo Vas sačekajte...'), ...
1
vote
1answer
293 views

How to load file, when I know it's filename, but not fid?

I create filenames using some ID and timestamps. I don't want to add additional table to "remember" associations, as filename keeps them pretty well: $filename = get_symbol_by_id($id) . ' ' . ...
0
votes
1answer
1k views

Is there any File Manager Module for drupal 7

I need a module as like as File manager. we need to view, edit, modify and delete the files and also with permission option. Thanks,
1
vote
2answers
662 views

How to Remove '-None-' option from Select List Field?

How can I remove the default option -None- in the Select list? It should not be an option in my select list.
0
votes
1answer
521 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
2answers
3k views

How to save file uploaded with plupload integration module, and make it managed?

As described here, I can use Plupload integration module to upload my files to server. They go there, I can see them in temp directory, and that's the point I'm stuck. Code I'm using for a field is: ...
1
vote
1answer
60 views

Categorised Multiple File uploads within a page in Drupal 7

I have a situation where I have to upload multiple files within categories. This can be explained by the following picture. As you can see I need to upload multiple files, but also need to categorize ...