The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
15 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
55 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
43 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
29 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
14 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
29 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
45 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,
0
votes
2answers
137 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
57 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
688 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
41 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
13 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
33 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
175 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
208 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
39 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
49 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
99 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
72 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
18 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
25 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
30 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
17 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
1k 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
80 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
42 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
73 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
144 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
56 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
22 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
73 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
293 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
113 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
171 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
321 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
159 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 ...
3
votes
1answer
233 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
504 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
74 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
172 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
401 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
189 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
92 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
531 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
608 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
804 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
750 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
251 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 ...