The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
17 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
20 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
150 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
29 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
0answers
8 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
25 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
0answers
40 views

file_managed table cleanup after replacing content

We have an issue where if we replace content pages on our Drupal site, the files referenced in the content page remain in the database. When we go to recreate the content page, Drupal starts throwing ...
0
votes
1answer
67 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
0answers
24 views

Unable to save private files

I have the same question as is discussed here: Problem setting a private directory but no solution is provided... If I set-up a private directory in config/media/file-system, even if it is the ...
0
votes
1answer
27 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
0answers
37 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
45 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
17 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
12 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
23 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 ...
1
vote
1answer
16 views

Page where I can see my user's managed files

Is there a page in Drupal that lists all of the files in file_managed that the logged in user owns?
0
votes
2answers
434 views

7: Form API: managed_file: AJAX upload error “Undefined index … in file_ajax_upload()”

I have a problem with "AJAX: add more file fields". The Problem: i create new managed_file field and add AJAX function "add more file fields". When i try to upload a file with first static file field, ...
1
vote
1answer
46 views

file_save_data fails in CLI

I'm trying to create a file attachment in a Drupal content node from a command line script. When I'm calling file_save_data(), passing a public://something URL as destination, it fails. I've tracked ...
0
votes
1answer
33 views

Private File System and Externally Modified Files

I have a D7 site that includes a few hundred nodes that have PDF attachments that use the core file field and the private file system. The site uses a custom module to dynamically watermark these PDFs ...
0
votes
1answer
56 views

How to fetch the existing value of a form field in the form?

I have a minimal form with a single field to add an image to an entity and a save button. I have used managed_file to add the image. After adding the image from form the image gets saved in db. Next ...
0
votes
0answers
94 views

Why does this webform uploaded file via ajax throw an error?

I have a webform and mymodule which alters it. The webform has a field stelle which gets populated based on the url query. For instance, if ?stelle=10 the field gets populated by the title of node ...
0
votes
1answer
48 views

How to duplicate image file in the same folder

i want to duplicate a image file in the same folder programmatically , so i'm used file_copy() function for this but the original file image replaced or renamed and in file_managed table on database ...
0
votes
0answers
16 views

Link to file within the content of a page (not just attach a file to a page)

When the user has completed a purchase with Drupal Commerce, I want to show a completion message with a link to download out application. It's the same file for every user, and people who haven't ...
1
vote
1answer
61 views

How to get the URL for the re sized image

I have built a custom form in Drupal 7. The form has a file type field which allows the user to upload an image. I'm using the below code in the submit function to save and re size the image: ...
0
votes
2answers
124 views

File upload with title

I want functionality where editor will be able to upload files and name that files whatever he wants, I just want additional field next to file upload field, is there any module which can do that? ...
-1
votes
1answer
84 views

How to show the uploaded managed_file in the edit page?

I am able to successfully upload files using managed_file. The file is saved in the correct directory and the record shows up in the file_managed table. $form['image'] = array( '#title' => ...
0
votes
2answers
134 views

Notice: Undefined index: #value in element_validate_integer_positive()

I'm getting the error Notice: Undefined index: #value in element_validate_integer_positive() (line 4190 of includes\form.inc) after clicking the Upload or Remove of a managed_file even though the file ...
1
vote
1answer
130 views

Does Multiupload Filefield Widget for Drupal provides a Form API element?

I have a form in on of my Drupal page that uses Multiupload Filefield Widget to upload multiple images at once. I want to alter the functionality of this Multiupload Filefield Widget from my custom ...
0
votes
1answer
141 views

How to submit form on selecting image in file select widget?

I am using Drupal Form API to upload profile image for user. I found two file upload widgets in FORM API: '#type' => 'managed_file' & '#type' => 'file' managed_file requires first ...
2
votes
1answer
120 views

File Upload, overwriting every time

I am using the Migrate module, and I need to upload a CSV file before every migration run. I've created a module that allows me to upload a file. My first step was to make sure I had the logic ...
-1
votes
2answers
237 views

get path of an uploaded file

This is my form to upload a photo $form['Background_image'] = array( '#type' => 'managed_file', '#title' => t('Choose a background image'), '#description' => t('Click "Browse..." to ...
0
votes
1answer
54 views

remove an uploaded file drupal7

I am working with files in a drupal module. I added this form $form['Background_image'] = array( '#type' => 'managed_file', '#title' => t('Image'), '#progress_message' => t('Please ...
1
vote
4answers
105 views

journal website [closed]

I need to create a journal management website that will have authors - who can submit journals to be published, reviewers - who review submitted journals of the author, subscribers - who can ...
0
votes
0answers
344 views

Drupal7 managed_file form

I have this managed_file form in a Drupal customized module, with this form a user can upload an image and saved it under sites/defaults/files. $form['Background_image'] = array( '#type' => ...
0
votes
0answers
124 views

Custom Stream Wrapper

I have a file field in a content type. The files uploaded by this field should be handled by a custom php script. I think the best way to get this done is to write a custom stream wrapper. However, I ...
0
votes
0answers
66 views

Using managed_file element in hook_field_widget_form()

I'm fairly new to module development in drupal. I'm working on a custom module that will create a field in a node that will be based on the information in an xml file that I am uploading in the ...
0
votes
0answers
505 views

An ajax http request terminated abnormally with debug info

I received the following error while adding image in my blog post: Location: http://www.mysite.com/file/ajax/field_screenshot/und/0/ form-YKEwrcYmmrIxDcswqmKmGPwZwYZDtkhPmp_C9v49L94 Referrer: ...
2
votes
1answer
294 views

Why isn't my managed file getting saved?

Please save me from ripping out the rest of my hair... I've got a "managed_file" field in a form; nothing special. When the form is submitted, I run something like the following code to, presumably, ...
1
vote
1answer
2k views

Problem setting a private directory

I have problems establishing a private files directory (D7.22) I started at reading this article: http://drupal.org/documentation/modules/file. I then created a private folder above the Drupal root, ...
0
votes
1answer
651 views

Ajax error while uploading or removing file throught managed file

I am getting following error while using managed file through my custom form. "An Ajax HTTP request terminated abnormally." Also, I updated my jquery version to latest using jquery_update ...
-1
votes
1answer
549 views

Managed File Field and file_usage_add() - what should I attach the file to?

I'm creating a module which uses the Form API and integrates with the Mantis bugtracker system. I have included a managed file field on the form and am at the stage of handling the form submission. ...
0
votes
0answers
212 views

Drupal 6 alternative to Drupal 7's managed_file Field API type

Is there a Drupal 6 alternative to the Drupal 7 managed_file field type? I have an configuration form using multiple image fields, and I'm using managed_file field type in Drupal 7 which works ...
3
votes
2answers
2k views

How do I set the custom upload directory for a plupload from field?

My module uses a plupload form field. I'm trying to define a custom directory for my plupload uploads. A normal upload form for a managed file looks something like this: $form['managed_file'] = ...
1
vote
1answer
338 views

Ctools Custom Content Type Plugin with Image Field

I was wondering if anyone has been successful with incorporating an Image field 'type'=>'managed_file' into a ctools plugin. I created a custom ctools plugin but am having some difficulty with the ...
2
votes
1answer
84 views

Programmatically save altered file

As I mentioned in my previous question I'm attempting to write tests for a patch that will, ideally, trigger the creation of a redirect if the URI of a file changes. My patch uses hook_file_update() ...
0
votes
0answers
110 views

Media module, file usage, and simpletest

I'm trying to write a test that will do the following: Create a user Create an 'article' node Upload a file via Media module Insert that file into the body via pre-determined markup Save the node ...
2
votes
1answer
323 views

How to list all managed files?

I need to get Drupal to list all its files and their management status for debugging purposes. It seems like there must be a simple way to print the list of managed files, right? How is this done?
1
vote
1answer
233 views

How can I replace an image using a Form API?

I have a form that works great for adding fields, including and image, to a node and saving it. I want to allow users to edit their fields and change the data, including their image. I figure there ...
4
votes
1answer
1k views

Managed file: What is the proper way of setting #default_value?

$form['picture']['file'] = array( '#type' => 'managed_file', '#title' => t('picture'), '#description' => t('Allowed extensions: gif png jpg jpeg'), '#default_value' => ...