Questions tagged [files]

Use it to generally reference to those files used on websites which could be video, images, pdfs, etc.

Filter by
Sorted by
Tagged with
2
votes
1answer
332 views

In the File Entity module, what is the purpose of multiple “Enabled displays” and “Display precedence order” for a single display mode?

In the File Entity module, what is the purpose of multiple enabled displays and Display precedence order for a single display mode? Or what is the use case where I would need to provide multiple ones ...
2
votes
2answers
2k views

Where can I find custom content type templates file?

Sorry for ask this easy question, I know the net its full of tutorials, but the info is a bit confusing since they are always showing the diference between D7 and D8 (i didn't use a CMS before so it ...
2
votes
1answer
277 views

Overwrite file_directory_temp function without touching the core?

I need to modify the file_directory_temp() function, but I can't touch the core. My drupal-site runs in Microsoft Azure Cloud and I need to exclude all temp files from drupal-root into a absolute ...
1
vote
2answers
908 views

Load video to youtube when node save

I have search but not found so I need to ask. I need a module that permit to my users to load a video into the node add form and this video need to be loaded into my youtube/vimeo page. Is there? ...
1
vote
1answer
2k views

Purpose of Media module

If I am using the IMCE file uploader combined with CKeditor, is there any point in installing the media module? Or does media replace the imce when wysiwyg module is used?
1
vote
2answers
3k views

how to validate file upload in drupal [closed]

how to validate file upload in drupal means, in my form allowed only txt file, but now user also can upload image file also after change the extention .jpg -> .txt function ...
1
vote
1answer
582 views

How to change file system in drupal 8

I have been using public file system has the upload destination for file field. I want to change public file system into private file system. I cannot change it it showing below error. There is ...
1
vote
1answer
138 views

How to display 'Terms and conditions' before starting a download, possibly using Rules?

We have a page displaying various download options. When the user clicks one of the options we would like to display a terms and condition page and then take the user further to the actual download ...
1
vote
1answer
2k views

How do I attach files to nodes?

I need to add files to multiple value file field using drupal rest api (restws module). return format of restws is something like this : "field_files": [ { "file": { "uri": "...
1
vote
1answer
1k views

Imce file browser not showing select button

The IMCE file browser seems to be missing it's select button. On this File field, I'd like content creators to choose an image that is already located on the server (not uploading a new image). What ...
1
vote
1answer
1k 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
3answers
2k views

How to get images into a slideshow via json javascript with new itok

I have just updated to drupal 7.21, and I have massive errors with the new itok suff: Right now I use json_encode(views_get_view_result('viewsitem')), and decode the result with JSON and JavaScript. ...
0
votes
1answer
71 views

How to restore private file structure after major version update? [closed]

After a Drupal 6 to 7 update we are unable to use private image download, symptom is we cannot access private files via system/files, while public files can be loaded. Trying to download private file ...
-6
votes
1answer
630 views

File upload broken on node form [closed]

I have the same problem described in I get image field upload errors with a custom node_add() form. How do I add these lines to the menu item array? 'file path' => drupal_get_path('module', 'node'...
8
votes
5answers
905 views

Where can I download old releases of Drupal?

I'm trying to find a copy of 6.20 to run a diff on a client's Drupal install. I believe there's been changes to core. How can I get version 6.20? Additionally, how can I download any older Drupal ...
6
votes
2answers
3k views

How can I make downloads available only to authenticated users?

With Drupal 7, I created a content type with a field to attach files. I am using private file uploads. When viewing the node, the list of attached files is visible to every user, including anonymous ...
6
votes
1answer
477 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 ...
5
votes
1answer
1k views

Combine Webforms to export multiple form results in a single CSV

I need to be able to select multiple webforms and then be able to export all of their results in a single CSV download. I am considering using this module (Views data export) but I'm not yet sure it ...
4
votes
3answers
2k views

How to allow for files of any extension to be uploaded?

I'm surprised this hasn't been asked before like this. I want to allow users to upload files of all file extensions, without enabling each extension by hand. How do I do it?
4
votes
3answers
5k views

How can I rename uploaded files programatically? (auto-rename image files)

I am aware that the File Paths module allows administrators to use tokens to set patterns for renaming files, but as of writing (Jan 2015) there are more than 100 bugs in the queue and no updates to ...
3
votes
1answer
819 views

How to skip the ReferenceAccess constraint on a file upload by an anonymous user?

I have a contact form for job applications with a file field on it so users can upload their CV. Because of privacy / security, the uploaded CV's must be stored in the private filesystem. ...
3
votes
1answer
607 views

Matching a route with a “file path”

I'm trying to debug a route that should work like the one(s) used by the private: file scheme (i.e., a path like system/files/path/to/file, where path/to/file is an arbitrary string that may contain '/...
3
votes
1answer
2k views

Organizing uploaded files in folders created by date

This could be very trivial, but I haven't been able to find a good solution. I have an image field associated with a content type called article, and I wish to organize the files uploaded during ...
3
votes
5answers
7k views

Get fid from file path

I've to create a custom function to display images because I've to add values from custom fields. I've added a function to template php, like this: function mytheme_image($variables) { } The ...
3
votes
2answers
5k views

View PDF as “node”/content

I'm working on updating our current intranet to Drupal. What I need to be able to do is take a PDF and load it in an iframe/node via Adobe Reader (or similar). I can get something similar using (I ...
2
votes
0answers
528 views

Unsafe to use NFS to share sites/default/files between many Drupal instances?

If you have a high-traffic website backed by multiple Drupal instances, you may want to have a dedicated file server that hosts sites/default/files, and somehow share that between all those Drupal ...
2
votes
1answer
521 views

When adding media to content, how can I search for the media by tag or term?

In Drupal 8, I created a new Media type "PDF Files." I have imported almost 30,000 of them, each complete with Title (Name), file, and the taxonomy that categorizes them. On the content type (Let's ...
2
votes
2answers
1k views

file_save_upload with multiple form

I have a form with the following input field: <input type="file" name="photo_files[]" /> I would like to save each of this files using file_save_upload and then change their status to ...
2
votes
3answers
5k views

Upload Images to specific folders

how do I upload images (Media) to specific folders inside the default directory? I will have thousands of pictures and would like to have an organized structure of folders. Thanks a lot.
2
votes
1answer
3k views

How to create a URL to an unmanaged public file in Drupal 8

I'm running into a problem creating a URL to an unmanaged file in the "public" file directory (this is for the file_example for Drupal 8). The following code will throw an exception: use Drupal\Core\...
2
votes
1answer
1k views

Prevent accessing files in Drupal files folder directly by following link

I have member area on my site, and there i have files available only to members. (also, not to all members, but to members of some role, and also they are further granulated by field condition, but ...
2
votes
0answers
192 views

“Upload Images” tab blank when adding media

I have successfully updated my Drupal 7.24 site to use Media 2.x dev (2014-Mar-19) and Media Gallery (2014-Feb-26). The existing galleries are displayed perfectly. The only issue I'm facing is that ...
2
votes
1answer
610 views

How do I make the file description field required?

In Drupal 7, I need users to enter a file description, how do I make this field required? Also on another note, I would love to make this field a select list, there's no clear way to do this aside ...
2
votes
1answer
838 views

how to add a cck field for youtube embed code?

I have created a content type. I want to add a cck field to the content type where I can paste the youtube video embed code. So that when I display the value of that field, a youtube video should ...
2
votes
0answers
122 views

Sync Alt and Title values from CCK imagefields with media module file fields

I have a situation where I really need to access the alt and title values of an image on a node. I can retrieve these values in a node View, but in a file View these values are not accessible as they ...
2
votes
2answers
3k views

Lightbox 2 - Embeded Media Field / Media : Youtube can't play videos on LightBox2

I tried using both 'Embed media field' and 'Media : Youtube' module in D& website to create a content-type field to embed youtube videos and play in on lightbox2. Although images work well with ...
2
votes
1answer
487 views

How to make download file link to open form and mail the download link to email?

My flow is like that. I have scroll-able list of download links for Private files. When user click on Download File link it will show Form to gather some data like first_name, last_name, email and ...
2
votes
2answers
3k views

How do I display the attachment's file size of a node?

Is there any way in Drupal 7 to display the attachment's file size of a node through the manage file / display of the file field, or is this programmatically achieved?
2
votes
5answers
2k views

How to download Database results as PDF or in EXCEL

I have a custom query to fetch the details from database (oracle). The results are generating properly as expected. Now i need to download these results either a PDF or an EXCEL file. Any way to ...
2
votes
1answer
4k views

What's the best file permission to drupal's files and directories? [duplicate]

Possible Duplicate: What are the recommended directory permissions? I want to know what's the best file permission under a linux system to my drupal's files and directories including the files ...
2
votes
0answers
26 views

Where can I locate source code of Drupal 1.0 or earlier version? [duplicate]

As for learning purposes, as I am developing my own micro-CMS (well, in fact a femto-CMS) in PHP + MySQL, I would like to locate the earliest possible version of the source code of Drupal. In Drupal....
2
votes
2answers
2k views

Noob question about private files and Content Access

This is almost certainly a really stupid question, but the Drupal 7 site we're building has an image gallery that users can upload content to. Unauthenticated users should not be able to see these ...
2
votes
1answer
2k views

What's wrong with my plupload implementation?

For reasons that are out of scope here I should not send packets over 32 MB, so my php.ini looks like this: ; Maximum allowed size for uploaded files. ; http://php.net/upload-max-filesize ...
1
vote
3answers
3k views

Change individual file from public to private and vice-versa

Running Drupal 7. I have two file fields set up: One is public, the other private. I need to be able to take a file which has been saved as a public file, and switch it to the private file field. ...
1
vote
1answer
260 views

How to show filesize when content type contains more than one file?

I'm using Drupal 7 and having File 7.14 field installed.I have a content type (named file) containing more than 1 file. I have a view that shows the filesize of all the files of the content of that ...
1
vote
0answers
268 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
2k views

How to import image using Feeds which doesn't have a correct file extension?

I am using Drupal 7 and Feeds to import an image field into a content type article and it does work when the image URL is a direct link to the image. However images that are linked to image handlers, ...
1
vote
1answer
61 views

Is there a means for telling which module or template files generated a block?

I am trying to find out what code generated a faulty looking devel block and want to know if there is a module that can tell where a block was generated or some other means. Is there a module for ...
1
vote
1answer
1k views

Changing the file of a file field (drupal 7)

I have a content type that contains a file field which is always a .zip file. When a file is uploaded I have a module that unzips the file to make a few changes then re zips the file to a new ...
1
vote
1answer
1k views

Webform, creating customized directories for uploaded files

Newbie and my first question on here. I'm still learning Drupal. So apologies if I missed anything Here is my issue I am using Webform to create an upload page. The user enters an ID(text field) and ...