Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
345 views

How to delete a managed folder and its contents programmatically via hook_uninstall?

My hook_update_N() implementation looks like this: $directory2 = 'public://folder_name'; file_prepare_directory($directory2, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS); How can I remove "...
dasj19's user avatar
  • 247
0 votes
1 answer
341 views

How to upload image or video from mobile device to content [closed]

Creating node via mobile browser goes ok, but when adding image or video i can only record and upload which also works fine, but i can not access gallery and choose an image to upload. Options ...
Azz Kawa's user avatar
  • 749
1 vote
0 answers
110 views

Saving file not working with rules module

I want to execute some custom code when going from state A and B. I'm using the rules module and workflow module and trigger when changing state. This works but the custom code that I want to run ...
Fever's user avatar
  • 107
1 vote
1 answer
59 views

Display text according to the access to a field

With field permissions, I restrict the access of a field to certain users. I would like to display some text to inform the user that he has no access to the field. I tried it in node.tpl.php : &...
Hgfdsoiu's user avatar
0 votes
1 answer
191 views

FileField Paths works bad when upload image - the wrong way comes?

I have my VPS with two sites: in first i have FileField Paths and it works bad. In second i have no FileFiled Paths and everything ok. The error is this: When I choose photo in the Image field and ...
tlito's user avatar
  • 519
2 votes
1 answer
4k views

How to send an email with a download link? [closed]

I had installed Webform Protected Downloads. But there are lot of things I don't like about this module: Too many steps to download files. The email's body content is only for plain text. You cannot ...
learnallskill's user avatar
0 votes
1 answer
554 views

How to use file_save to store pictures into a folder on server?

what i want to perform (globally) is to import a csv file that contains data such as book_title, author, and the cover image of the books. The csv file is loaded, book_title and author are stored in ...
Sushi's user avatar
  • 129
0 votes
0 answers
25 views

Images served from private files dir unprintable in IE11

IE 7 - 10 have been killed off. Please somebody kill ie11 too. I have a D7 site that stores images in file fields in private://. IE11 fetches these images appropriately and displays them in normal ...
artfulrobot's user avatar
  • 4,059
2 votes
1 answer
2k views

How can I track download statistics for private files?

One of the most important metrics for the publications database I'm working on will be file downloads, looked at in various combinations with things like publication type, date published, etc. With ...
UltraBob's user avatar
  • 1,339
2 votes
1 answer
1k views

How to automatically create nodes from a bulk file upload

I've got a hundred or so files (mixed types: pdf, ppt, doc, etc). I want to be able to upload these to my server, and then point my D7 site to the directory on the server that contains all of these ...
Jim's user avatar
  • 833
1 vote
1 answer
836 views

PDF viewer for Drupal

I'm searching for a PDF viewer for Drupal 7 which doesn't renders as a Mozilla Firefox PDF or a google's PDF. Does someone know anything that I could use?
Anna's user avatar
  • 13
0 votes
1 answer
1k views

How can I set per file access controls by role to files on a node

I'm migrating a publications database from an old CMS to drupal 7 using the migrate module. One of the requirements is that some publications (nodes of content type document) will be available to the ...
UltraBob's user avatar
  • 1,339
2 votes
1 answer
2k views

Get all managed file usage by id

Is there a way to get all the managed files used by a particular entity, i.e. a node or other module item? Looking in the file_usage table there is an id column and this is what I want to retrieve ...
Chris Leather's user avatar
0 votes
2 answers
6k views

What is FID and how does it works? [closed]

I could not find a clear explanation about what is a 'fid'. I got is an identifier for file in drupal, but no more than that. How it is generated? Is unique for any file? When it is used and why? ...
Sasha Grievus's user avatar
1 vote
1 answer
22 views

How one can display the file path once it is successfully uploaded

How one can display the file path in node/add page, once it is successfully uploaded, before saving the node.
Yama's user avatar
  • 629
0 votes
0 answers
84 views

Drupal 7 large files from private file system not fully downloading

Files from private system are not fully downloading. When I download the file of 20MB or less it is downloaded perfectly. Files more than 20MB are not fully downloaded. For example after downloading ...
user avatar
0 votes
1 answer
547 views

Add fields to feeds importer

I want to import the fields "alt", "title" and the custom field "copyright_notice" via feeds using the following code: function budg_eu_projects_feeds_processor_targets_alter(&$targets, $...
abelass's user avatar
  • 69
1 vote
2 answers
2k views

DOMPDF not showing images and writing empty tmp files via print module

I recently moved a Drupal 7 website from my development server to my pre-production server, and the rendering of the images from both the Body field and various images fields stopped working. I now ...
Bertrand's user avatar
  • 111
0 votes
1 answer
62 views

Store all images uploaded to website in specific directory

I have been using various image gallery modules, customised views galleries/ slideshow and my images are ending up in multiple directories also stored as different sizes e.g. thumbnail, medium, large.....
testing1's user avatar
  • 101
0 votes
2 answers
328 views

Ckeditor and IMCE not working with Plupload

When I use IMCE with CKeditor as a WYSIWYG for my website it works fine: However when I add the Plupload module which would allow me multiple files selection it breaks! If this can't be fixed, is ...
testing1's user avatar
  • 101
0 votes
2 answers
52 views

Show page content on another page using views

I have a 'presentation' page where I would like an image gallery where all the uploaded images that users upload to the site are displayed. So far these images are being displayed only on the 'upload'...
user avatar
1 vote
2 answers
524 views

Warning: Invalid argument supplied for foreach() in taxonomy_field_formatter_view()

My Drupal installation has some warnings, I tried several patches, but none of them works for me. These are the warning messages: Warning: Invalid argument supplied for foreach() in ...
hg96nl's user avatar
  • 67
0 votes
1 answer
27 views

Move uploaded content automatically from one node to another

Is it possible post images/text on a different page other than the one being uploaded? I have an insert page where users can add images/text but I want whatever they post to go on another page ...
user55564's user avatar
0 votes
0 answers
629 views

How to replace ajax callback of file upload in managed_file?

I have a text-area with some content inside. I have another form element that is for upload xls file. Now what I want to achieve is, when I click on upload button the xls file content should replace ...
Sugandh Khanna's user avatar
0 votes
2 answers
114 views

How to list the uploaded files (image file) of unsaved nodes?

From the question What happens if a user uploads an image but doesn't save the node? and its answer, there is a table called file_managed and for any uploaded file (an image in my case), it sets 0 in ...
M a m a D's user avatar
  • 3,837
1 vote
0 answers
587 views

Plupload integration in custom form

I have been trying to use plupload field in a custom form which I am doing by using the following code: $form['picture_upload'] = array( '#type' => 'plupload', '#title' => t(''), '...
TheCoderGuy's user avatar
0 votes
1 answer
232 views

How do I properly render a private file URI with l()?

If given a private file with a uri of private://Screenshot from 2015-12-07 15-52-42_0.png. How might I use l() to properly render the link? When rendered as follows I see https://server/drupal-...
Rick's user avatar
  • 2,984
2 votes
1 answer
452 views

How to revolve TinyIMCE error 'The version of TinyMCE could not be detected'?

I installed these modules: Wysiwyg, IMCE Wysiwyg bridge, IMCE. Then downloaded the libraries from: https://www.tinymce.com/download/ (developer edition, community doesn't even have a non minified ...
Bruno  Vincent's user avatar
-1 votes
1 answer
1k views

How to create slideshow having both video and image slides

I am using Views Slideshow module for slideshow banner in my Home page, I create slides with images but I also want to add videos in that slider. I have installed video module to create video field ...
Bharathi's user avatar
  • 143
0 votes
1 answer
309 views

wysiwyg upload image as background

I learn how to upload images by using IMCE Wysiwyg bridge module. How about upload images and treat it as background picture?
peifa's user avatar
  • 495
5 votes
2 answers
1k views

How to download programmatically a module?

I need to programmatically download projects from drupal.org, and then eventually enable it with modules_enable. Anyone knows how to do it? Here's the final solution : I'm sharing the code i used for ...
Ismail H's user avatar
  • 389
0 votes
1 answer
311 views

How to prepare directories in private file system?

I've configured private file system. Using it from UI works well. I want to generate dump site content via devel_generate with custom modifications. So I'm hooking into Node API for assigning sample ...
Codium's user avatar
  • 4,953
0 votes
2 answers
65 views

How to fix broken file.module function 'file_ajax_progress' without hacking the core and patching after every update?

When site has enabled page cache and anonymous user tries to upload a file, he cannot see upload status progress. He see only message "Starting upload...". Bug was reported in June 2012, has a working ...
Jasom Dotnet's user avatar
0 votes
1 answer
1k views

How can I fix the "Could not delete temporary file"?

I'm getting below error when run cron: The specified file could not be deleted, because it is not a valid URI. More information is available in the system log. Due to TMP files, my site will be ...
Parvateesam's user avatar
0 votes
1 answer
1k views

Calculate Audio file duration

I am using Drupal url field in which I input any external url of an MP3 file hosted on Twilio Server and I then use html5 audio tag to render it as an audio file in node display. Everything looks fine ...
Shabir A.'s user avatar
  • 2,913
1 vote
1 answer
145 views

How to display a video file without using the video hosting websides?

I need to display video file without using youtube, vimeo etc. I am using the bootstrap theme. I've tried to using some modules with no luck: Module: MediaFront, Field type: File, Display mode: ...
stan's user avatar
  • 11
2 votes
0 answers
93 views

Private files broken

I just moved a site to another server (Windows IIS 8.5). Public images are working perfectly, but private images seem to be broken. By having a look at the browser's inspector, I can see that when I ...
typologist's user avatar
0 votes
1 answer
45 views

How to make links to private directory always use ssl?

I am trying to connect all links to files in a private directory to use SSL. This is what I have done so far; if (preg_match('!^system/files/webform/([^/]+)(/.*)?!', $path, $matches)) { if($...
colinam1992's user avatar
1 vote
1 answer
96 views

How to add a file lock to all existing files in directory

I've just started using file lock to prevent images getting deleted, so we can build up a store of images for use at a later date. I think this module will solve a problem I've had, but only for ...
artfulrobot's user avatar
  • 4,059
0 votes
1 answer
138 views

Is there a CKeditor / Drupal module that allows for a one-button image upload (without requiring Flash)? [closed]

Background: I'm looking to add an image upload button to CKeditor. Ideally, I'd like to automated the click responses to start IMCE and jump right to the IMCE Upload button. In fact, I'd like to put ...
Rick's user avatar
  • 2,984
0 votes
1 answer
146 views

How to set default form values based on query string, if the form uses AJAX file upload

I have a Book content type with a file upload field. I'm using Filefield Sources module with Plupload integration for getting the file upload widget. I need to set a default value based on the query ...
Aram Boyajyan's user avatar
2 votes
1 answer
1k views

What is the proper way to set up an AWS Auto-Scale group? [closed]

What is the proper way to setup an EC2 Web Server with the aim of serving a site which experiences high demand once a month via 1 small EC2 for 90% of the time and then enter a load balanced group for ...
n34_panda's user avatar
  • 207
0 votes
1 answer
63 views

Receive a file with Drupal 7

I have a java application that will send a CSV file to a Drupal 7 site through using POST method. how i receive file on drupal side by using custom module I need to parse the file to add data into a ...
Promo's user avatar
  • 365
1 vote
1 answer
333 views

Moving / Migrating image files from another site into an existing Drupal 7 site

I'm currently doing a data migration from one Drupal 7 site to another Drupal 7 site. So far I exported the data from the old site into a CSV file and then have it get imported into the new site by ...
Patoshi パトシ's user avatar
6 votes
1 answer
485 views

What happens if a user uploads an image but doesn't save the node?

I would like to know what happens if a user uploads an image by image field but doesn't save that node? It seems that image will be in the directory but no node refers to it. Is there anyway to ...
M a m a D's user avatar
  • 3,837
4 votes
3 answers
7k views

How to programmatically assign (attach) a file to file field while creating/saving the node?

I'm trying to assign (not upload) files to nodes programmatically. This is the scenario: I will create 2000 nodes and there are 2000 PDF files (one PDF per node). I don't want to upload these files ...
herci's user avatar
  • 2,158
1 vote
0 answers
74 views

Webform uploads / Media

I've run into the following: User uploads are among the uploads from the admin / editors. Is there a possibility to show uploaded files from the webform module in a different module than the Media ...
Jacob Francke's user avatar
0 votes
1 answer
1k views

What causes 'Invalid form POST data' when removing an attached file from a node? [closed]

I have an attached PDF file on a file field. When I click the 'Remove' button, the AJAX throbber appears and then the file remains unremoved. Adding an file to a new node still works. I checked the ...
ev_patrick's user avatar
2 votes
2 answers
3k views

Private files return 404 not found

I have a problem whereby any files uploaded into the private directory cannot be viewed - returning a 404 not found error. The images upload ok and get placed in sites/default/files/private directory. ...
Chris's user avatar
  • 487
0 votes
1 answer
126 views

Hook form upload

I need to show a modal message like "Uploaded file exceeds X MB" when the user tries to upload a large file. I have set maximum size in the field settings and when I try to upload a large file Drupal ...
Cris's user avatar
  • 229

1 2 3
4
5
16