The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
0answers
27 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
1answer
24 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
11 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
28 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
23 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
34 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
27 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
24 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
15 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
23 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
42 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
49 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
17 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
103 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
24 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
53 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
66 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
17 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
42 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
24 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
21 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
90 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
38 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
0answers
113 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
37 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
38 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
105 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
28 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
3k 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
185 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
96 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 ...
0
votes
0answers
1k 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...'), ...
0
votes
0answers
65 views

Form submit function not called when using managed file field

I have a bunch of custom module forms that has been working for a number of months. Yesterday I started to play around with a whole bunch of modules and file settings that were related to files but I ...
1
vote
1answer
174 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
985 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
535 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
389 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
2k 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
55 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 ...
0
votes
1answer
29 views

On export Managed_files With Features No UUID Added

I have a custom field of type 'managed_file' along another field of type - 'file'. This node is exported into feature. The field with 'file' type gets UUID attached while it does not for ...
0
votes
0answers
60 views

Unable to save audio file to node in drupal 7

I am attaching an audio file to node using services 3 in drupal 7. When I hit my URL: www.mysite/api/nid/attach_file I get an error: STATUS 500 Internal Server Error: An error occurred (23000): ...
0
votes
1answer
446 views

Setting managed file default value from ajax request

I'm trying to create a form using the Form API with the following behavior: For a custom slider module, users can choose to upload an image which is saved as a managed file. This works fine. They ...
0
votes
1answer
99 views

Set node field value in separate form

I have a File field attached to my content type. Using Drupal, when we are creating new node, we use node form to set all field values for particular node. But is it possible to create more forms for ...
1
vote
0answers
46 views

How to properly duplicate image for “clone” form? [duplicate]

I have a form for cloning entries. Basically it works the same way as entry add form, it saves under brand new ID, but is pre-filled with data from existing entry. For data like text and references, ...
0
votes
1answer
269 views

From API - Managed File: Remove Button not working

I'm using a "managed file" to upload an image, which works fine, but if you want to remove the image by clicking on the "remove" button, nothing happens. $form['logo'] = array( '#type' => ...
0
votes
1answer
134 views

Parse managed file

I am very new to Drupal 7 module development and I have been working to develop a module where it parses a file after the user uploads it. I am using hook_forms, but for some reason I can't get a ...
1
vote
0answers
19 views

What is going on with this exposed operator on my view of files?

What I did: Edited a View of Files Added File:usage:entity ID as a filter Exposed the filter Exposed the operator Selected an option and applied it. I see these weird empty boxes appear below the ...
0
votes
0answers
55 views

File usage as views filter?

I'm overriding the Workbench default view of files, and trying to add a filter to let the user optionally show all files that have no usage on nodes. I see that there are ways to filter and show file ...
1
vote
1answer
36 views

From managed file ID to end-user link - neat and clean way?

I have a structure in database, and I want it printed. So in hook menu I have entry with 'page callback' => 'mymodule_mystructure_display', And in inc file I have function ...