Static files used on websites which could be video, images, pdfs etc.

learn more… | top users | synonyms

0
votes
0answers
16 views

Should I check in sites/default/files?

I installed a fresh D8 and was going for the usual setup of sending code and config to repo, and db sync (from a backup dump or sync from remote). Now when I reproduce the site given the code, config, ...
0
votes
1answer
20 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 ...
-1
votes
0answers
17 views

URL and file location handling not OK on Windows [on hold]

I tried to install drupal 803 on a windows7 64 bit server, MySQL, apache and php 7.03 using the default install procedure / script. Drupal is only one of the applications on the website and that is ...
0
votes
1answer
30 views

How to implement process change avatar(image field) in one click? [on hold]

The user has an avatar (image field). As the image field to display only the button image upload and display only one (last upload) image when viewing and editing the profile? ie that when you click ...
-1
votes
1answer
14 views

Features doesn't recognize my drupal version

I looked in Status report: Drupal 7.41 I get this error: Please enter a valid version with core and major version number. Example: 7.x-1.0 I've tried all sorts of combinations but nothing works, ...
2
votes
1answer
26 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 ...
0
votes
0answers
23 views

How to use Drag & Drop dnd:removeFile event?

I'm using Drag & Drop module to let users upload an image in their profile (I'm using a custom profile tpl). In that custom profile, I'm using in-place editable fields with AngularJS, so there ...
3
votes
1answer
54 views

Is there a way to use File Field but have it’s directory path be different for different instances of content, instead of the same?

I’m selling mp3’s via Commerce File/File Field modules and i need these files to reside in different directories based on artist name and album name, etc. For example: ...
1
vote
1answer
13 views

how to monitor available disk space [closed]

Is there a module I can use to monitor how much available space is left on the disk for fileuploads, or would I be better of running a cron periodically?
0
votes
1answer
14 views

how to monitor large file downloads, and create reports

Is there any way we can monitor who downloads a file from our drupal 7 site so that we can create reports from it?
0
votes
1answer
21 views

Drupal csv file not readable

I have a module which reads in csv file and adds records to the database. It is working properly on localhost. I am able to upload the file and read and then display the result. But, on my server, i ...
0
votes
1answer
38 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 ...
2
votes
4answers
305 views

How do I save a file with managed_file in a theme?

I'm developing a theme that it requires to have a header image in the front page so I have this. casper.theme function casper_form_system_theme_settings_alter(&$form, &$form_state) { ...
0
votes
0answers
12 views

Allow registered users to attach previously uploaded files to a webform

Using Drupal 7 and Webform module Vers 4. How can I make the files that users uploaded to either their profile or into nodes available in a webform? The goal is to give registered users that want to ...
0
votes
0answers
10 views

How to display all images from all entities with alt attribute?

I have a problem with viewing all the images uploaded to the site. I need to show images that uploaded to nodes, terms, bean blocks. They are using different image fields, so that means that they use ...
1
vote
1answer
33 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 ...
0
votes
0answers
17 views

drupal 7 programmatically upload file to custom file field

I am trying to update a node, and programmatically upload a file the current code is here : $nid = 45343; $node = node_load($nid); $image_url = 'http://test.com/misc/druplicon.png'; $file = ...
0
votes
1answer
16 views

Is there a way to use a file field without having to upload the file when creating the content?

I’m using Commerce File module for creating mp3 products. I’ve been unable to create a bulk feeds importer because of having to upload the files. Is there a way to simply add the file name when ...
0
votes
0answers
17 views

Custom file types

I created a custom file type (to add documents and images). And in my content type, under allowed file types, I only checked my custom file type. However, when I trying to upload a file, it is giving ...
0
votes
2answers
20 views

How to check if file has changed during (hook) form_validate in a form?

I have a custom content type, and the relative form for creating/editing contents. It contains a file field. I need to check, during hook function mymodule_myform_form_validate($form, ...
0
votes
2answers
51 views

What is FID and how does it works?

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? ...
1
vote
1answer
17 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.
0
votes
0answers
18 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 ...
-1
votes
1answer
20 views

code change alert/email [closed]

Is there a module to help me receive email for any change in drupal site ? https://www.drupal.org/project/logging_alerts this module help a lot in log in / log out and add content .. but I need to ...
0
votes
1answer
70 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, ...
1
vote
1answer
14 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, ...
1
vote
1answer
61 views

Get the public path directory

I want to save file programmatically in public path, and I want to know how can I get Public Directory path in Drupal 8. In Drupal 7, I would use the following code. ...
0
votes
0answers
24 views

How to programatically upload multiple files?

I am trying to create a form which has a multiple file field upload. I have found the Multiupload File Widget module which seems like it should do the trick. I created the form element, but I'm not ...
1
vote
1answer
13 views

Issue license without an order

I'd like to issue free Commerce Licenses to files for users of certain roles without creating orders. I haven't been able to find a tool for this in the Commerce License UI. Have I missed it? Or is ...
0
votes
0answers
13 views

Acess Private files for specific domain for view its content

I have my private PDF files in my private folder. I want to view my PDF files in iframe by docs.google.com/viewer like given URL below: ...
1
vote
3answers
56 views

Multi-media files not showing [closed]

Uploaded multi-media files to: public_html/sites/default/files no error messages permissions: 0775 files do not appear (in Content, as do files uploaded through the media editor) Switching from ...
2
votes
1answer
20 views

Find/Replace in File Field

I'm working with a site that has many files that have been uploaded to it. Data has been pulled from these files to populate fields such as title, description, etc. Some of these fields contained ...
0
votes
2answers
21 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 ...
0
votes
0answers
16 views

Migrate Private Files: FILE_EXISTS_REUSE still duplicate files

I'm trying to migrate private files (file migration), the problem is even I set file_replace to 'FILE_EXISTS_REUSE' the files are still duplicated (it adds _1 or _2, and so on.). Here is my mapping: ...
0
votes
0answers
18 views

Add a line of text a PDF document

I have a Content Type which has a file field. The file is always a PDF. Whenever someone downloads one of the PDFs, I was to add text to it, e.g. today's date and the username. It doesn't have to be ...
0
votes
2answers
40 views

How do I 'reset' a theme completely?

I think I have deleted some .css theme files in my local directory by accident and when I delete All the theme's files to re-install and get the original files back, they still aren't there. Is there ...
3
votes
2answers
69 views

How to show files with lighbox/colorbox effect?

My goal is to create a gallery of all media of the site. I created a views-page of type file with bootstrap grid format that displays all file type of my site (File: Mime type (has word jpeg jpg png ...
0
votes
1answer
22 views

If folders don't exist in URI path, file_save_data() fails

I am programmatically importing images and saving them via file_save_data(); $fileContentsPath = 'http://mypathtofile.com'; $uri = 'public://myfolder/mysecondfolder/filename.jpg'; $image = ...
0
votes
0answers
19 views

How to find backdoor that is adding code in my /includes/theme.inc file? [duplicate]

I got a "site may be hacked" warning from Google in one of my Drupal sites and while working to resolve this, I noticed that a hacker gained access to the /includes/theme.inc folder and added codes ...
0
votes
3answers
41 views

How do I set the path for the public directory?

I used to have a Drupal installation on var/www, but I had to move it to var/www/drupal. The problems is that my files are still in var/www/sites/default/files and I am unable to move them. I need to ...
2
votes
1answer
31 views

Print the location or filename of an uploaded file from a custom content type

I'm trying to figure out how to print out the file path and the name of the file uploaded from a custom content type. I have my template all setup and everything printing how I need to, the last thing ...
0
votes
0answers
5 views

Profile2 File field

I added 2 file fields to a profile2 profiletype. When I upload a file I get the following warning: Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'profile2_form' ...
0
votes
1answer
26 views

User Files Download w/o Upload

I am trying to figure out a clean way to do this in drupal 7 but can't find a clean way. Problem: A user needs to be able to download files without the need to upload any files. Files are placed in ...
0
votes
2answers
91 views

How do I get the MIME type of a file basing on its content and not its extension?

I want to get the exact MIME type basing on the file content, not its extension. I have used PHP methods and the API exposed by a module, but they return the MIME type basing on the file extension. ...
0
votes
1answer
22 views

Lots of permissions errors, should the entire site be set to www-data?

This is my first time configuring a lamp stack and I'm running into lots of problems with permissions. Here's an example of one of the errors The specified file temporary://fileChLMzd could not be ...
1
vote
1answer
34 views

Drush is always scanning the whole drupal directory?

Every time i run a drush command the command returns after 40s. (or more if time consuming operation like cache clean or so) After strace the command i realized that drush is scanning my whole drupal ...
0
votes
2answers
89 views

Loading third party PHP SDK library from a custom module drupal 7

I am writing a custom drupal module (my first one in my life), and I am trying to load an external library (https://github.com/jwilsson/spotify-web-api-php), and until now I used these methods: ...
0
votes
2answers
22 views

Migration multibyte images file name issue

I have a Drupal website that I transferred it from host A to host B. I have some images uploaded with its Arabic file name, it works fine on host A, but after zipping Drupal files into a zip archieve, ...
0
votes
1answer
14 views

Output Path to File Content in Views

In a view I would like to output just the path to the piece of content where the file is referenced like the below: http://www.example.org/file/1 I DO NOT want to link directly to the file ...
0
votes
1answer
42 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 ...