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
5answers
2k views

Media name as link to file

I have a "Document" media bundle, and I have a custom view mode called "Embed". In that view mode, I have removed everything except the media name property and my document file field. For media name ...
2
votes
2answers
4k views

Can't access private files

I have implemented a private file system for users to upload files. This appears to be working as I can see that the file is uploaded into the proper directory. The problem I have is that no one has ...
2
votes
1answer
2k views

Is there any harm is manually modifying file_managed status?

I'd like to manually change the status column of a record in file_managed. The file URI is located in a permanent location. I simply forgot to change the status to 0 before performing file_save. I ...
2
votes
1answer
630 views

Youtube Media with Media Module, won't render

I'm using the WYSIWYG module and I enabled the media browser button for it. When I add a youtube video, only the thumbnail shows... Why is this?! (I'm using ckeditor.)
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
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
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. ...
1
vote
1answer
143 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

What is the suitable file permission for 'files'?

I have written this small bash script to rebuild D6.22 file permissions: #!/bin/bash cd /path/to/drupal chown -R bob:www-data . find . -type d -exec chmod u=rwx,g=rx,o= {} \; find . -type f -exec ...
1
vote
1answer
735 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
2answers
920 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? ...
0
votes
3answers
2k views

Managed file validation on first upload only

In D7,I have new_form with a managed_file field to allow my user to upload documents to public://. I'm trying to prevent my user from uploading a document if the file name they are trying to upload ...
0
votes
1answer
72 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
637 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'...
7
votes
5answers
977 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 ...
4
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
6k 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 ...
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?
3
votes
1answer
654 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
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\...
3
votes
5answers
8k 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 ...
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
1answer
1k 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. ...
2
votes
2answers
4k 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
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
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
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
1answer
906 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
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 ...
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
499 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
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
2answers
2k 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
1answer
634 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
844 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
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
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
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
555 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 ...
1
vote
1answer
1k views

the Private files folder outside of “sites/default/files”

The Private Files directory is outside of the sites/default/files directory. Is that fine? I haven't got any problem with that, yet. I'm using Drupal 7, if that makes any difference.
1
vote
2answers
414 views

How to fire a Rule after adding a new file in multi-value field?

Working with Drupal 7.56, Rules 2.10, Conditional rules 1.0-beta2 and File Entity 2.4 I can't fire a rule when I add a new image in a multi-value Image field (related to File Entity for inline fields)...
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
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
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. ...