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

learn more… | top users | synonyms

0
votes
0answers
7 views

IMCE module: list only image files

I have a Drupal 7 with the IMCE module installed. It works good but it shows me every files in my media directory. I need to limit the listing to only image files, for example to only jpg, png and ...
0
votes
0answers
15 views

Images of some content types disappeared

I have something strange going on on one of my drupal installation. It seem's that for two content types all the images got unlinked from the existing entities. I can still see in the table ...
1
vote
0answers
25 views

Upload to private directory

I'm trying to setup a private folder for part of the files I need to make available in my Drupal 8 install and I'm having some trouble. My public files are being served with no problem in sites/...
1
vote
0answers
25 views

Add validator and description to file upload form

I want to check the min width of a picture when using the file upload form (file_entity_add_upload). normally I would do function my_module_form_file_entity_add_upload_alter(&$form, &$...
1
vote
0answers
15 views

File association With node in drupal of already uploaded file using Services

I created a file on drupal service using /api_endpoint/file Multipart post method and got response as fid and uri. { fid: uri: } Now when i need to add the fid to my custom field of a node which is ...
3
votes
1answer
31 views

Override base url when creating links to public files

I need storage the upload into drupal file in another server and I need change public path to files to example http://server_with_image/image How I can do this?
0
votes
0answers
6 views

Migrate D6 ImageField Extended captions to D7 File Entity Inline captions

First of all, I am completely new to the Drupal world and my apologies if I fail at clearly explaining my issue, or if I am missing something that should be obvious. I "inherited" a D6 website just ...
1
vote
0answers
23 views

How is media document entity different from file document entity?

I hope this is the right place for my question as I want to understand media document a bit more. I'm working on a library website. Each book can have one or more files. Each book file should accept ...
0
votes
1answer
15 views

Files migration failed

I am trying to migrate Drupal 7 site to Drupal 8. Other migration processes work well, but only file migration fails. I have files in sites/default/files/. This is my migrate_plus.migration....
0
votes
1answer
17 views

Attaching fields to files

I have a couple of forms where I need to attach metadata fields to files (a description, and a category). The file_entity module alone lets me specify fields, but doesn't change the form fields. ...
1
vote
1answer
96 views

How to upload file from a custom module?

I am trying to create one basic module for Drupal 8, where I have added one form with some textfields and multiple file upload element. Now on "submitForm" I am saving textfields values on database, ...
0
votes
2answers
54 views

How should I link (public) files to nodes?

I have many resources (mainly PDFs) that need to be imported to my site. Previously the files would manually be placed in sites/default/files/mydir and linked to the node like this: <a href="/...
0
votes
1answer
22 views

No more error messages shown, once i uploaded a file of invalid size?

The scenario is as follow: when i uploaded a file with invalid extension a proper error shown, everything is fine. nothing bad with invalid extensions. where as: when i uploaded a file of larger size (...
0
votes
1answer
50 views

Consume nodes from REST export views

I am trying to import nodes from a different domain's REST export view. I am able to get all serialized nodes from the view through Guzzle but once I try to create a node from the hal+json response I ...
1
vote
1answer
31 views

How to eliminate direct access to files in private directory?

I have set up my Drupal 7 site for private files in a directory above root (../private). I also set my filefield on my node type to upload the image files to that private directory. I have two user ...
1
vote
2answers
14 views

Downloads restrictions through direct URL

I am developing one feature in which user will get one pdf from my site, for this I have developed a process below, 1) user will click on the link and form open in popup 2) after submitting the form ...
1
vote
1answer
40 views

background-image and sites.php

I have a multisite configuration with Drupal7, my prod site is mysite.example.mydomain.com and dev is mysitedev.example.mydomain.com I have set in sites/sites.php : $sites = array('mysite.example....
1
vote
1answer
44 views

What are folders within sites/default/files for?

There is a quite similar question in What are all the directories for in the new Drupal 8 structure? about the Drupal directory structure, but it is not explained the content of the sites/default/...
0
votes
1answer
11 views

File directory token - image field - node author

How to setup file directory where the images are saved to use tokens based on node author ? I have all setup with current user, but this is not good if moderator or admin needs to make a change with ...
0
votes
0answers
26 views

Detecting if a file path is potentially under core/

I'm implementing a patch that needs to enforce different behavior for a module implemented in Core than for a module implemented in Contrib. The test for this needs to be: Secure -- it should use a ...
0
votes
1answer
37 views

Iterate over items in FieldItemList?

In other words: How do I get the URI for each of the files in a file field that's on a custom content entity called 'listing'. Right now I have: $images = $variables['elements']['photos']['#items'];...
1
vote
0answers
21 views

Multi Site Install Problem

I downloaded drupal 8 and performed an install without any noticable incident, after completing the install I attempted to use drush to install 4 additional sites, I added the sites to the sites .php ...
0
votes
1answer
69 views

How to create an 'Upload a file' field?

I have a content entity type, and I would like to have an 'Upload file' field. I have declared the field in my Entity class $fields['file'] = BaseFieldDefinition::create('file') ->setLabel(t('...
0
votes
0answers
13 views

“Class not found error” when including the file [duplicate]

I have a controller inside my module as follows. <?php /** * @file * Contains \Drupal\module_name\Controller\ControllerName. */ namespace Drupal\module_name\Controller; use Drupal\Core\...
1
vote
1answer
39 views

How to make blob file downloadable?

I have created a Module to make blob file available for Download in Drupal 7 . Below my code for .module file <?php function blobfile_block_info() { $blocks = array(); $blocks['...
0
votes
0answers
29 views

Absolute path to an image [duplicate]

This is a really basic question, but I haven't been able to find a clear answer on how to do this: I am designing a TWIG template and am inserting an image into it. I would like the image to have ...
0
votes
0answers
17 views

How to create a custom content type that accepts zip files and puts them in a new directory?

I want to simplify the workflow for putting an e-magazine on my D7 site. I currently have to manually upload a zip file, move it to a custom directory with in sites/default/files/emagazines/...
0
votes
0answers
14 views

Error connection reset when uploading PDF Flip module export file via web interface

I'm working with a designer using a flash based flipbook software called PDF Flip. The software has a drupal module export option which produces a zip file. The issue I'm having is that when I try ...
0
votes
0answers
28 views

Hook before the file insert, before the file come on the server?

I want alter the URI's files before they are stocked in the server. The file insert, I mean, everywhere/time a file is uploaded via Drupal (all insert file process, not only when an user add a file ...
0
votes
1answer
22 views

How to delete file using drupal_form_submit?

I'm using rest services with a custom resource on node update, i want to build the correct variable node structure to delete one of the files on a file image multiple fields. I removed the file ...
1
vote
1answer
28 views

Video Migration from MySQL

I have a video link and the video is there in my FTP. I need to migrate videos from mysql to DRUPAL database. Video complete path is stored in mysql database at present. In this process I dont want ...
0
votes
0answers
37 views

How get a publish url for already uploaded file in azure blob storage

Hi I am using azure for Windows Azure Integration in my drupal site. Its perfectly storing store files, images and media. But after storing the the video file I need publish url for the video to be ...
1
vote
0answers
45 views

How to create private links to unmanaged files ?

I have created my own module with custom block to display private downloads to authenticated users. The downloads files are provided by 3rd-party system and stored in private folder of Drupal ...
0
votes
0answers
21 views

Drupal Caching Files

After install and setup of my Drupal site, I've noticed that Drupal has placed a few dirs/files in my file directory like css/js. Is it safe to remove these files when I move my site? What other cache ...
0
votes
0answers
10 views

Allow authors of products to download their own file [duplicate]

Is it possible to allow authors of products to download their own file and have a file license by default? Which code must be used and where? (Drupal Commerce)
3
votes
1answer
21 views

Where does Drupal set the uploaded file name syntax?

I have a file with a filename which has a double underscore in it. When Drupal saves the file, it shortens it to be only one. ie: Snapshot__john_doe_2_opt.jpg When Drupal saves the file, it ...
0
votes
0answers
12 views

Social Cards for Video content type

I'm using a content type called Video with a field from Video embed field module . I'm generating an automatic thumbnail for the video using thoses modules: Imagecache Actions Imagecache Canvas ...
0
votes
0answers
20 views

How to grant access file license to Product creator?

Is there a way to grant access file license to Product creator (maybe in Rules) in order that Product creator could view file link and he/she could download it?
0
votes
0answers
16 views

View Commerce file for Product Creator

How to show a file link to Product Creator in Views? I tried using (Commerce Product) Commerce Product: Files (Files) in Fields but only the names of files are shown and they can't be downloaded by ...
0
votes
2answers
21 views

How do I display self-hosted video content

What I am trying to do is embed a self-hosted video on a webpage. I have the video uploaded onto the web hosting in mp4, ogv and webm formats; converted where necessary using Miro Video Converter (if ...
0
votes
0answers
27 views

How do I make available blob files of custom table from database to views as downloadable files?

I created a custom table with filename, mime type, and file as blob field. How do I make available the file field to views as downloadable file in Drupal?
1
vote
0answers
29 views

Drupal 8 upload and embed a video to WYSIWYG

So what I am searching for is a module that gives us the exactly same functionality that we already have with the image tool in Drupal 8 in the WYSIWYG editor. And that should be working with just ...
2
votes
1answer
21 views

How to set file upload directory by parent node content type and node id

I am trying to set the upload directory for a file field to contain the content type (and node id) as part of the path. The desired path for my public files field is publication_documents/pub/...
0
votes
1answer
45 views

D8 doesn't create .htaccess for private file system path

Following this guide: https://www.drupal.org/documentation/modules/file it says "When you specify the private directory in admin/config/media/file-system it will automatically create the sub-...
1
vote
1answer
26 views

Using video module with ffmpeg to convert; how do I display converted files?

All uploaded videos on our Drupal 7 site need to be in a standard web format: MP4-H.264/AAC to assure play back by all user devices. ffmpeg is working correctly. Video upload field stores all ...
-1
votes
2answers
47 views

How to delete files when the node that displayed them is deleted?

Is there a way to delete files/images from the server automatically when the main node is deleted? How do I implement this?
0
votes
0answers
45 views

How to rename uploaded files

Using Drupal 8, I want to rename and clean all filenames, e.g. If someone uploads file named like this Screen Shot 2016-03-29 at 1.13.21 PM.jpg, I want to clean it so that convert all spaces to dashes ...
0
votes
0answers
17 views

Commerce file description as text only

I've got a shop selling downloadable product variations. I'd like to display the Commerce Files field description to anonymous users as text only. Here's how it currently appears for registered users:...
0
votes
0answers
13 views

Allow both automatic thumbnail extracts from videos and manual upload

Is there a way to allow BOTH options for the users: to manually upload a thumbnail for a video and to have thumbnails automatically extracted through Zencoder? Because currently they are mutually ...