The managed-files tag has no wiki summary.
0
votes
1answer
68 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
100 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
86 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
88 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 ...
2
votes
2answers
327 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'] = ...
0
votes
0answers
86 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 ...
0
votes
0answers
42 views
upload file in form api
$form['image_fid'] = array(
'#title' => t('My Image'),
'#type' => 'managed_file',
'#description' => t('Please upload an image!'),
'#default_value' => variable_get('MY_IMAGE_NAME', ...
2
votes
1answer
48 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
57 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
...
1
vote
1answer
83 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?
0
votes
0answers
164 views
Drupal managed_file issues
I have a few forms trying to utilize one to many managed_files. On the initial load of the form, everything works fine. I can upload a file, remove, re-upload, save, it all works. I think because ...
1
vote
1answer
95 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
458 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' => ...
0
votes
1answer
369 views
Form API managed_file doesn't show up
I am working with Drupal 7. When I use the following code, nothing shows up in the form; when I change managed_file with file, everything is fine.
$form['mfile'] = array (
'#type' => ...
0
votes
1answer
263 views
How can i put popup box captcha on managed file remove button?
Can We write function for remove button as I want to display Captcha in popup on Remove button for security reason.
same type of some function like used in below post.
How can I automatically ...
0
votes
2answers
483 views
Error in validation of managed_file field with Form API
To begin I worked with this solution but a wild error appear: Image Upload in a Custom Module
Here is my code :
function module_top_content_equipe_admin_form(){
$default = ...
0
votes
3answers
110 views
Overcoming 255 character URI limit for files_managed
I recently stumbled upon an interesting limitation of Drupal. It seems that in the table files_managed there is a field called "uri" which represents the path to the files being managed by Drupal. ...
1
vote
1answer
305 views
Can't get AJAX on file upload working
I have a managed_file form element. I want to trigger an AJAX callback when a user clicks the upload button. But I can't seem to get anything working by attaching the #ajax element to the managed_file ...
1
vote
1answer
453 views
store fid of file_load into profile2
I programmed a multi-step form using the drupal form API. On the first page is
a user image file upload using the drupal managed field managed_file. When the form is stepped thru to the end and ...
1
vote
0answers
98 views
how to log downloaded files
I have a content type with a (private) file field. Content is protected by a node access module.
I would like to log (in a particular way) when a user is about to download a file.
hook_file_download ...
2
votes
1answer
191 views
Let users download entire folders (zip first) or individual files?
Is there a module or a series of modules that will allow users to download a folder of files (e.g. construction blueprints and sketches) or just individual files via the browser?
The files for user A ...
1
vote
1answer
219 views
Serve Drupal files from subdomain
On Drupal 7, I want all files to be served from a a subdomain of my site (eg. files.mydomain.com) for the simple reason that it allows a bit of flexibility going forward. So uploaded files, css and js ...
1
vote
1answer
136 views
Rules react on event for file_managed table?
Im looking for a solution to be able to create a "react on event" in rules for when a file is added to the file_managed table. Is it possible and if so, how?
0
votes
1answer
444 views
Scaling images on upload
I'm using managed_file in a form to uplaod multiple images (D7).
$form['img_upload1'] = array(
'#title' => t('Image'),
'#type' => 'managed_file',
'#upload_validators' => array(
...
0
votes
1answer
122 views
Use a managed file in a menu_item
Is there a way to create a menu that links to a managed file? I tried many times, but nothing I tried works.
Do you have any idea?
6
votes
2answers
413 views
Forms API: 'file' or 'managed_file' type with multiple/unlimited values
I've got a form that needs to have either a 'file' or 'managed_file' type field in it for uploading files via the form. Is there an attribute that can be set on the form item render array that will ...
0
votes
1answer
272 views
How to find the user avatar filename in Drupal 7
In my custom module for Drupal 7 I've been using the following 2 SQL queries to find the user's avatar picture and the city (a custom text field):
function pref_block_view($block_name = '') {
...
3
votes
1answer
191 views
How do I add the “cancel” button to a managed file
I made a new component for webform that adds a file upload component. It has a "choose file" button, and an "upload" button. You can also choose to use a progress bar during the upload.
Now I want ...
1
vote
3answers
430 views
How to know which file to delete in a submit function?
I've got a managed file field in a form like this:
$form['source_file'] = array(
'#type' => 'managed_file',
'#title' => t('Source File'),
'#default_value' => ...
2
votes
1answer
344 views
WYSIWYG error when using managed_file and AJAX
I have a form that has both a managed_file element and a text_format element. Both are encapsulated in a wrapper div (using #prefix and #suffix). On submit, an AJAX callback is executed and both ...
11
votes
1answer
5k views
Managed file: the file used in the field may not be referenced
I am having some issues with the managed_file type. Whenever I try to edit and save a form that has a managed_file element in it an error occurs: The file used in the Picture field may not be ...
