Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
0 answers
491 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
  • 177
0 votes
0 answers
24 views

Trouble upgrading 7.90 to 7.91 [duplicate]

I'm trying to keep a D7 site up to date, it's currently running 7.90. I tried to upgrade to 7.95, but I ran into trouble, and eventually figured out that it's the 7.90->7.91 transition that's ...
Ken Williams's user avatar
0 votes
1 answer
604 views

How to upload .webp to Image field?

https://www.drupal.org/project/imagewebp lets you upload a regular jpg/png which converts it into webp, but how to upload already a file that is in webp? Adding it as one of allowed extensions in the ...
user3108268's user avatar
0 votes
0 answers
28 views

How to prevent numbering (_0, _1) of file uploads? [duplicate]

Is there a way in Drupal 7 to prevent numbering (_0, _1) of file uploads with the same name? How to tell Drupal to replace the previous file? Maybe there is already a ready-made module? Or does anyone ...
anthony3d's user avatar
0 votes
2 answers
203 views

Files with 644 permissions and owner apache:apache are still failing Security Review module

I am using Drupal 7 and just installed Security Review. According to this page, the files should be 644. I tried that but I am still failing Security Review (I'm getting hundreds of files under the ...
MrSnrub's user avatar
  • 285
1 vote
1 answer
1k views

How can I overwrite existing file and keep same filename when uploading new

I have content type 'Document' and added the 'Upload document' field with type 'File' I want to replace file and update the node. I'm using below code function custom_file_upload_form_alter(&$form,...
user66981's user avatar
-1 votes
1 answer
72 views

Downloading xlsm is disabled for anonymous user: What function is responsible for this access control?

We have a D7.8 site with Panopoly 7.x-1.81. No access control modules. A standard filefield is used for uploads and functions perfectly for the usual set of mime types. We recently extended the list ...
boabjohn's user avatar
1 vote
0 answers
550 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,728
1 vote
1 answer
49 views

testing scheduled file deletions

Long story short, is there a correct way to override DRUPAL_MAXIMUM_TEMP_FILE_AGE? I'm working on testing a fix to a module I wrote a while back that handles some uploaded files. I neglected to call ...
Pete's user avatar
  • 147
3 votes
0 answers
105 views

Image derivatives removed by some process, only regenerated when switching to maintenance mode, then removed again

While moving a bunch of legacy D7 sites to a new server, I bumped on the following problem with one site only. This is certainly NOT the classical permissions issue on files directory. Bug description ...
Kojo's user avatar
  • 3,513
3 votes
1 answer
55 views

Should scripts/*.sh files be executable?

Drupal 7's recommended file permissions don't allow it's /scripts/*.sh files to execute. Should any server user have the ability to run those?
ponies's user avatar
  • 542
-2 votes
1 answer
90 views

Is it possible to bypass the local filesystem completely using an alternative filesystem?

I'm using a cloud hosting provider to host a Drupal site (7 moving to 8) with a huge amount of static file assets. The host charges a lot for file space. Is there a way to bypass the local filesystem ...
Michael Paler's user avatar
0 votes
1 answer
135 views

In node add, how to upload file using image from clipboard

How can I paste image from clipboard and save into image_field ?
DanielRatk's user avatar
0 votes
0 answers
692 views

How to set different root folder access for different roles in elFinder

I'm using drupal 7.69 and elFinder 2.1.46. A private page is showing elFinder browsing window with 2 root folders root1 |-dir1 |-dir2 root2 |-dir3 |-dir4 I am trying to setup 2 roles: ...
Tim CD's user avatar
  • 1
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
1 answer
18 views

Using different .inc files with same function names in .module file

In our project, we have this module meant strictly for our custom API endpoints for our mobile applications to use. Currently, this is handled in a single .module file like so: my_project_mobile_api....
user avatar
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
0 votes
1 answer
81 views

How do I reference a file field and node title from another content type & node?

I need to add a link to a file, added through a file field on its own content type called "Document" from another content type and node call "plan information". The idea is that the "document" nodes ...
Rob Orr's user avatar
  • 399
0 votes
1 answer
2k views

Force download string as text file

I'm trying to return the results of a db_query as a raw text file. The php solution uses header() to instruct browsers to download content. I've attempted using header() in an AJAX callback function, ...
Ghoti's user avatar
  • 123
0 votes
1 answer
72 views

Remove file pages

Forgive me if this has already been addressed, I searched for it but couldn't find a similar issue. I'm using the file entity module and it automatically generates a page for each of the files. This ...
themantimeforgot's user avatar
1 vote
0 answers
179 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
0 votes
2 answers
1k views

Where in The Database does File Usage Data Come From

How does data in file/[id]/usage get compiled? From what tables does it determine a use? Is there a way to track down how/where it gets this data and troubleshoot? Does it take include revision data?...
Sam's user avatar
  • 529
2 votes
1 answer
1k views

Firefox can't download private PDFs

I have an issue with FireFox where it can't download generated private file PDFs, yet Chrome has no such issue. We populate PDF files with TCPDF and they get moved and copied into a few different ...
AlbionBrown's user avatar
1 vote
1 answer
285 views

How to add an extra field in file upload widget?

I know that it is possible to enable a description field in the core file upload widget for Drupal 7. However, I want to add an extra description field like the one already present. For this I've ...
Patel Nitesh's user avatar
1 vote
1 answer
43 views

Get link address of a file

I have a page A that has an inline entity form that is referencing to page B, it's possible programmatically or in another way to get the link address of a file that page A is referencing to?
Frederick Castello's user avatar
1 vote
1 answer
305 views

How to save file with custom form?

I try to use that script in my Drupal site https://tutorialzine.com/2013/05/mini-ajax-file-upload-form I did not use drupal form api. I used my html same with that script. I created 2 pages with ...
Mehmet Öztürk's user avatar
0 votes
1 answer
48 views

How to restrict file access based on file path under private directory?

I have a list of files under sites/default/files/private/abcde/manuals/. I want to add restriction to the files based on certain logic which I can add in the code in a hook. The logic would be based ...
harshal's user avatar
  • 4,354
0 votes
1 answer
54 views

Site is redirecting to old domain on button submission, files are linking to old domain [closed]

I have a D7 site at www.example.com, an old one, not updated since 2012 (Drupal version 7.34). I made a clone copy with separate clone database under dev.example.com All files like CSS are still ...
user3108268's user avatar
0 votes
0 answers
28 views

Referring two file systems in a single site

I have production and staging environment that use the same file system (Amazon S3). I need to change the user profile picture saving path of my staging environment to local file system and other ...
Prasanth R's user avatar
1 vote
1 answer
338 views

How to Add Existing File to file_managed. File is Blank

I have manually added some files to the Private Files directory on my Drupal 7 site and wish to add them to the file_managed table in the database. This is what I have attempted: Load the existing ...
Andrew Webs's user avatar
0 votes
1 answer
111 views

Link to download pdf from webform email [closed]

I have created a webform, after the submession the customer is sent the registration confirmation e-mail. How do I include in this email a link to download a pdf ?
Imen Jendoubi's user avatar
1 vote
1 answer
54 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
0 votes
1 answer
2k views

403 forbidden error when loading images in test server

Am working with drupal7.When images are loading below error is showing in my test site console: GET sites/default/files/styles/slideshow_full/public/plans/30989/main-image/...
user3487918's user avatar
1 vote
1 answer
401 views

How to recalculate uploaded files' sizes in KB and update the values in the database?

I use a shell command to look for all uploaded JPEG files above 500 K.B. (originals) and do JPEG compression on them. They get smaller in size, but Drupal still shows the originally uploaded file size....
W.M.'s user avatar
  • 732
0 votes
2 answers
2k views

file_save_data doesn't save image

I'm using Drupal 7.56.. I want to upload images from other urls.. I use: $image_original_path = '.. here my original path..'; $my_destination = 'sites/default/files/images/'; $my_new_name = 'my_image....
A.Sana's user avatar
  • 147
0 votes
1 answer
407 views

Can't get fid of the saved file after file_save_data

I have been trying to get the fid of the file which my custom module is saving and every time I end up getting the error "Trying to get property of non-object in report()". I have tried file_object->...
MMH's user avatar
  • 1
0 votes
1 answer
354 views

What hook should I use to alter the File Upload field in Webform 7.x-4.16

In Drupal 7 Webform file field, might there be a way to access the link provided after the a file is uploaded? The reason is that we have a hot-folder/watch-folder process that runs, cleans a file, ...
Rick's user avatar
  • 2,984
0 votes
2 answers
2k views

RewriteRule causing internal redirect limit error

I am trying to server a static HTML site from /sites/default/files/staticsite and make it available via a subdomain. I'm hosting the site on Acquia Cloud, and their docs describe Maintaining a static ...
Andrew's user avatar
  • 302
0 votes
2 answers
4k views

CKEditor and IMCE: how to access to public files directory

I have a problem that I can't access public files directory from IMCE as file browser (and CKEDITOR as editor). When an user write a blog post, he can't upload images to public directory because this ...
briast's user avatar
  • 654
-1 votes
1 answer
1k views

How do I implement Download Count?

I am trying to sort my view of documents by "most downloaded". I see that there are only a few modules, Download_Count being one. There is no documentation on how to implement this. I have installed ...
KZeeh's user avatar
  • 1
1 vote
2 answers
988 views

Generate file path for created file so it can be downloaded

I'm writing a module based on this Jeff Geerling post that will allow the user to use a form to select some data, and then use the Batch API to generate a large .csv file with the desired data and ...
wonder95's user avatar
  • 1,219
0 votes
1 answer
210 views

Only allow specific roles to upload specific extension files

How do I restrict users with specific roles to upload files with specific extensions on node edit pages. On my site I have two specific roles editor and animator. Conditions are: Editors can only ...
ShanjayG's user avatar
  • 211
2 votes
1 answer
492 views

User can't access own private files via Views

I've set up a private directory sites/default/files/private and use it for a file field. As an admin, everything works as expected when uploading and viewing a private file. As a user who uploads ...
xinxin's user avatar
  • 31
1 vote
0 answers
79 views

Allow NAS-stored images to be attached to nodes and rendered using image styles? [closed]

What is the process that will allow images stored on a NAS to be attached to nodes that can be rendered with image styles while allowing the file structure on the NAS to be traversed by a Drupal 7 ...
user70961's user avatar
  • 145
1 vote
2 answers
518 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)...
Toki's user avatar
  • 424
1 vote
0 answers
31 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
0 votes
1 answer
69 views

HTTP/2 does not allows to write in folders in Drupal 7, how can I fix?

I've recently changed from HTTP 1.1 to HTTP/2, as soon as i did it I was not able to create or edit files from backoffice (both image upload or css/js cache), but if I did it from FTP there is no ...
Piero's user avatar
  • 141
0 votes
1 answer
460 views

Create a PDF with one result from a view

I have a view with information from a specific database table and I want users to be able to generate a PDF with the results from one row, which would contain all the information from the row. So far, ...
Christia's user avatar
  • 1,667
0 votes
1 answer
243 views

File always save with underscore

I have a custom form where admin users upload a CSV file. Everything is working fine, but the file is saved with an underscore. For example, I upload callLog4127_Lorem_20170701.csv but the file is ...
Pankaj Yogi's user avatar
0 votes
1 answer
49 views

File (Field) Paths get year only

I've recently found and started using the File Fields Path module in Drupal 7 and I have a date field that I'm only collecting the year from. Using that in the file path part of the module, it ...
Dan's user avatar
  • 123

1
2 3 4 5
16