Skip to main content

Questions tagged [files]

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

743 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
216 views

How to debug IMCE javascript problem

I have a D7 site with CKEditor + IMCE. The main site (www.example.com) IMCE works as expected. My staging site (cloned w/ Backup & Migrate) (staging.example.com) IMCE javascript is not working ...
Colin's user avatar
  • 21
2 votes
1 answer
177 views

FileField Permissions- How can I allow users to upload a file without giving them the ability to remove files that have been uploaded?

I want to be able to upload a file into an article but without the ability to remove other files uploaded from other users to the same article. Is it possible? I tried the Field Permissions module; ...
Yaniv's user avatar
  • 21
2 votes
1 answer
223 views

How do I control the file appearance using File Entity?

By installing File Entity module I was hoping to be able to control the way all file items are rendered, for instance I need: file rendered as a link wrapped inside an <li> element, or a link ...
no more drupal's user avatar
2 votes
0 answers
348 views

Dealing with files when file system is set to private download

I am working on a site where the file system security is a bit important. So we have it configured to use a private directory with the private download method is enabled. And this works great for the ...
Patrick's user avatar
  • 1,310
2 votes
0 answers
203 views

User points download per node instead of per file

The userpoints download module works great for people to buy credits for file downloads. I have three CCK fields in a content type, but I would like to remove a single user point no matter how many ...
webmayin's user avatar
1 vote
1 answer
72 views

Avoid serving unused core files

I analyzed my Drupal website using Chrome's Code Coverage feature. I noticed that there are a lot of core files loaded (CSS and JS) which aren't used at all, for example: Resource Unused /core/...
summerturnips's user avatar
1 vote
0 answers
329 views

Why is CloudFlare blocking file uploads?

I have a simple form where people raise IT helpdesk requests (oh, the irony...) and this creates a case in CiviCRM. It's an unsophisticted but cheap helpdesk system for the few requests we get. A ...
ChumKui's user avatar
  • 179
1 vote
0 answers
117 views

upgrade_d7_file_private failed

i am trying to migrate drupal 7 private files to drupal 9 Step 1 :- i have modified below file /opt/httpd/htdocs/staging/sitename/master/web/core/modules/file/src/Plugin/migrate/source/d7/File.php ...
user avatar
1 vote
0 answers
26 views

How to output file upload date (of a file field) in a JSON-view?

I have rest_export view to generate json output of nodes. I'm trying to output a the upload date of files in a multivalue filefield, but can't find a solution. I tried to use the "rewrite results&...
Chris's user avatar
  • 11
1 vote
0 answers
225 views

Running a hook after node save, or another way to get the file name attached to a node

We've a D9 site with a custom module which generates and saves CSS code. It takes the name of the file attached to a node, and generates CSS to set it as the node's background. Initially, I tried ...
Bytech's user avatar
  • 111
1 vote
1 answer
82 views

How do I insert migrated file info into a file field?

Successfully migrated public and private files to D9 system using core d7_file and d7_file_private migrations. Now trying to migrate the file info into file fields (entity_reference_revisions:...
SomebodySysop's user avatar
1 vote
0 answers
173 views

How can I access the file-link.html.twig template?

I'm trying to access the functionality of the file-link.html.twig template that comes with the classy theme so that I can have the file-type icons automatically appear next to the file links. I've ...
bigmike7801's user avatar
1 vote
0 answers
433 views

Theme suggestions file-video.html.twig

I have a block with the media field video bundle (drupal 9) and it renders the video through the file-video.html.twig. I have copied template to my custom theme from core. What do i need is to ...
Vitaliy K's user avatar
  • 129
1 vote
1 answer
85 views

Key based access control for private files

I'm building a site that provides paid video content, for embedding in customer's own sites. I'm successfully controlling access to the nodes that contain the video content based on purchasable user ...
griz's user avatar
  • 194
1 vote
1 answer
232 views

Compress file with ArchiveInterface without file paths

I'm trying to create an archive of log files to be downloadable in a form making a custom module in Drupal 9. In the form, the user can change the format of the archive, as per image: Here below my ...
Sanci's user avatar
  • 103
1 vote
0 answers
131 views

Permission denied on some private files, even though access is permitted

Drupal 9.3 We have a site that allows private file uploads. We get intermittent files that cannot be viewed/downloaded, even with the "User 1" account. There is no difference between a ...
quantumized's user avatar
  • 1,229
1 vote
0 answers
581 views

Restrict a Media field to allow selecting only a certain file extension in an existing Media Type

Is there a way to restrict a Media field using an existing Media Type (File) in a Content Type to permit only a certain file extension in that instance? In particular, I need a subset of the permitted ...
Timmah's user avatar
  • 197
1 vote
0 answers
242 views

Files migration from local dev site

I'm migrating from Drupal 7 to Drupal 9 and am having an issue with my source files getting found with the upgrade_d7_file migration. My public files directory for my source site is not 'sites/default/...
C0c0b33f's user avatar
1 vote
0 answers
79 views

How are compiled CSS and JavaScript files handled with S3?

I have my Drupal site set up to upload public files into the S3 bucket but am having some strange behavior with different environments and different s3 buckets. I have 3 s3 buckets: one for our ...
BlondeSwan's user avatar
1 vote
1 answer
528 views

How can I have the file upload destination private by default?

Currently Webform file component uses public files as default upload destination. This is probably because private files path is not always available if not configured in Drupal settings correctly. ...
Nasser Ali Karimi's user avatar
1 vote
0 answers
458 views

S3FS S3 module image source issue

I'm using the S3FS module to use an AWS S3 bucket as my sites/default/files directory. When I upload images they are successfully uploading to the bucket. I edit a node and include the same images via ...
sisko's user avatar
  • 1,720
1 vote
1 answer
75 views

Image File Upload via REST case Error 500 response due destination directory not set

I'm struggling to upload images to the Drupal 8 site via REST. Finally, I managed to deliver the file to the server, but then the error 500 rased due destination folder not set. I can't figure where ...
Vladimir P.'s user avatar
1 vote
0 answers
96 views

Is it possible to run code when the REMOVE button is clicked from a managed file?

I have a managed_file field on a custom form when I need to run some code if the REMOVE button is clicked after uploading a file. PURPOSE: When a user uploads a file to the managed_file field on the ...
quantumized's user avatar
  • 1,229
1 vote
0 answers
234 views

File permissions

Recently moved to WSL and Ubuntu and my Drupal 8 project has a specific issue with the JS and CSS cache files. When I click Aggregate js and css in performance the site breaks. Used Drush to update ...
Robbozinoz's user avatar
1 vote
1 answer
72 views

How can I link the file name to the file?

I created a content type with a "file" field type. This to upload a pdf file. Now I want to create a link to open that specific file, in my twig. If I do this : <div>{{content....
Basiel Debra's user avatar
1 vote
1 answer
479 views

How do I track a publicly downloaded file?

I am creating a custom module to track the file download time and user id with a file link or path. I have tried multiple modules but the download the file time tracking option is not available. How I ...
Adeel Nawaz's user avatar
  • 3,211
1 vote
0 answers
40 views

File (Field) Path settings to rename multiple images with their alt or title

The module File (Field) Path allows me quite nice to rename a single image file with its "alt" or "title". But if allow the image field to accept multiple downloads, I cannot get the individual alt/...
Benjamin's user avatar
1 vote
0 answers
167 views

How can I re-populate file_usage and file_managed tables?

I have a commerce website. I am also consuming a web service and creating corresponding products, including matching products with another table's rows. I have the below code. It ran several times and ...
Kartagis's user avatar
  • 610
1 vote
0 answers
1k views

How can I read uploaded CSV file data and create nodes from it?

I have created custom module. but don't know how to read uploaded file data and add into perticular content type. HTML File upload is displayed but after upload file unable to read content. function ...
Nilesh More's user avatar
1 vote
0 answers
202 views

Remote File Upload with URL Parameters

I'm currently using a digital asset management tool that allows us to host images as a CDN. The DAM allows us to crop and position the image using URL parameters (example: https://embed.widencdn.net/...
Daniel's user avatar
  • 59
1 vote
1 answer
26 views

Storage API + Services 3: How to work together?

I am trying to set up a site that will be storing a large amount of images. I am using Storage API module for that and It is working fine through web. Now I need a REST Service to upload images. I am ...
Alfonso_MA's user avatar
1 vote
0 answers
244 views

How can I migrate an Amazon S3 bucket to into Drupal?

SCENARIO I currently have a bucket where all my images are hosted and stored. I currently display them by simply using URLs that link to the images (i.e https://[bucketName].s3.amazonaws.com/[...
B. Cratty's user avatar
1 vote
0 answers
171 views

FillPDF Generating PDFs of 0 bytes when using local PDFtk

We just moved from Scientific Linux to Ubuntu, and as a result have moved from FillPDF Local Server to locally installed PDFtk. All PDFs that are generated are now 0 bytes. There are no related ...
Pablo Gosse's user avatar
1 vote
0 answers
16 views

How to customize the file display

I have a problem that I'm unable to solve. I created content type named test player to display files with Able Player, that is an accessible audio player for blind users. So, I installed requested ...
Germano Carella's user avatar
1 vote
0 answers
104 views

How to place private folder on another server?

I am designing a file store with Drupal 7. The server provider told me that I am not allowed to put the files in the current server and I have to purchase a download server beside the current server. ...
Mehrdad201's user avatar
  • 1,312
1 vote
0 answers
93 views

Use Filename for File entity Page and Window title

Drupal 8 file entity full display mode apparently uses the word 'File' for both page title and window title. Yuck. I've reviewed the various answers on this question, but I'm not seeing a definitive ...
JamesWilson's user avatar
  • 2,158
1 vote
0 answers
514 views

Google invisible recaptcha doesn't work with form file fields

I have a form in my drupal project which has a managed_file field. It worked perfectly until I added invisible recaptcha for the forms. The file is getting uploaded but when I submit the form the ...
i am batman's user avatar
1 vote
0 answers
242 views

Private files works on one site but not another

I have two sites on the same machine - demo and dev. They are served from their respective home directories. I've set up private files on both. All the settings seem to be exactly the same. However, ...
naomi's user avatar
  • 1,245
1 vote
1 answer
62 views

How to fire a Rule when an image is removed from Image field with unlimited values?

Working with Drupal 7.58 and File Entity 2.19 and Rules 2.10 First I needed to fire a rule when saving a new file and I found a solution (here). Now I would like to fire a rule when an user removes ...
Toki's user avatar
  • 424
1 vote
1 answer
51 views

How to add files using rules module?

This question follows Override webform module submit Based on this answer, I used the rules module to create a node after webform submissions. My webform contains an <input type="file" /> for ...
A.Sana's user avatar
  • 147
1 vote
1 answer
447 views

Download all files attached on a site

I have researched a little bit and I haven't found a sound solution to downloading all attached files from all content types across an entire site in an single action. I have found a couple modules ...
Abram's user avatar
  • 11
1 vote
1 answer
38 views

Can I check a file's properties before saving it with system_retrieve_file?

My understanding of system_retrieve_file is that it saves the file temporarily first. Is it possible to check this file and if it passes, then save it? I've only used this function like below. $...
Niall Murphy's user avatar
  • 2,771
1 vote
0 answers
1k views

What permissions should I set in Drupal core files?

I get a very long message when flushing the caches, starting with Warning: unlink(/[my-website]/sites/default/files/css/css_mXyk_ET1j0oQS97qAccqHtOxn-21f8f9PeabB5s5OTE.css.gz): Permission denied in ...
Mars's user avatar
  • 105
1 vote
0 answers
72 views

File value is NULL in custom file field type

I am creating a Custom field type for "file upload" functionality that contains a File form. This is the code I am using. /** * Plugin implementation of the 'AkamaiUpload' field type. * * @...
Chandu V's user avatar
1 vote
1 answer
265 views

Webform2pdf - Message body empty

I'm trying to use webform2pdf to generate a pdf containing form inputs. The form works fine if I don't check "Generate PDF Document", and I receive a confirmation email. If I do enable the PDF, I don'...
user2265915's user avatar
1 vote
1 answer
255 views

Role level file access control

I have been asked to control access by different groups of users to files uploaded to a website. This covers both files uploaded as a field, and files uploaded via IMCE and CKEditor. I have several ...
tanbog's user avatar
  • 1,273
1 vote
0 answers
30 views

Drupal 7 - Custom File links

On my Drupal site, there's a specific type of content with a right panel (Documents), in which I add files (Field Type - file, Widget - file). For that particular type of content, I wanted to change ...
Eduardo Almeida's user avatar
1 vote
0 answers
40 views

Access to private files change after deleting parent node where it was originally attached

I just ran into a situation where access to private files changed after its deleting parent node. I confirmed that anonymous users do not have "View private files" permission. If the node is ...
Matt's user avatar
  • 131
1 vote
0 answers
363 views

Image Derivatives for Private Filesystem not being generated

I'm trying to keep all files on a D8 site in the private filesystem so that I can rely on Drupal to deal with the permissions. The problem is, it seems like when an image is in the Private filesystem, ...
UnsettlingTrend's user avatar
1 vote
0 answers
467 views

Print module and wkhtmltopdf - How to install on linux centos shared hosting

I use The Print 7.2.x module and want to work with The wkhtmltopdf library. I downloaded library files from this address: https://github.com/wkhtmltopdf/wkhtmltopdf (this comment adviced to download ...
omiti's user avatar
  • 145

1 2
3
4 5
15