We’re rewarding the question askers & reputations are being recalculated! Read more.

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
0
votes
2answers
706 views

The file names are not transliterated on upload

I am using Drupal 7 and have transliteration module enabled. I have a file field and I want to have the names of the uploaded files to be transliterated on upload. The url alias for the nodes are ...
1
vote
1answer
1k views

How to add delete button to file field upload widget that actually deletes the file (not just association with content)?

After uploading a file with the File widget for the File field, the file is on the server and remove only disassociates the file from the field (and the content that the field belongs to). I would ...
1
vote
1answer
2k views

Display Auto Generated Youtube Thumbnails with 'Video Embed Field' Module in Views

I added some videos to my site and I'm using views to display them. I followed a tutorial and i used the rewrite the output option of the view with allowed replacement patterns to display videos in ...
1
vote
1answer
846 views

File field upload in modal/dialog

I have a custom content type with file field as one of the fields. For theming/UI purposes I should make this file field as clickable button. And only when user clicks on it, he/she gets modal window ...
2
votes
1answer
789 views

How to show list & thumbnail widget in plupload?

I have installed the following modules: FileField Sources Plupload, FileField Sources, Plupload module and added latest plupload library. While uploading multiple files it is showing only list of ...
-3
votes
2answers
70 views

Upload file to S3 directly instead of using temporary storage

I have one file uploading form in Drupal 8 where I am uploading 3 different assets and they might be around 2gb or more in size. I have the s3fs module enabled and configured properly, but (due to ...
0
votes
1answer
32 views

How to add file extensions while creating a field (type file) through the module installer.yaml?

I need to add 4 fields to an existing content type in Drupal 8 website, 2 of them is text another 2 is file type, I have a multisite setup and have 30 country-specific sites so I need to add for every ...
0
votes
1answer
368 views

Get file extensions in drupal exposed filter

I had a content type with a file upload field. The user is restricted to upload files with specified extension in Allowed file extensions settings. I created a view for listing all files. Now i need ...
0
votes
1answer
350 views

How to make uploaded file permanent to node without node submit

My module automatically save new empty node when user create new node and redirect to edit this node. Now, is it possible to make uploaded file on _node_edit form without submitting form? edit: When ...
0
votes
2answers
10k views

Add header and footer for every pages printed

I've used print module version 7.x-2.0. I've used pdf-version and print-friendly-version. Now i want to do two different things. That is, Is it possible to add separate CSS for pdf, html or email ...
0
votes
2answers
5k views

Unable to upload files. Though the maximum file size limit is 80 MB, can't upload even 50 kb files

I copied a site from localhost to AWS server. I can easily upload files in localhost but when I try uploading in the live site it gives me the error "An unrecoverable error occurred. The uploaded ...
1
vote
2answers
85 views

Cannot download generated files

I have a site (Linux/Drupal/Apache) that generate a .xlsx file from custom code and its saved to files, but after that I cannot download it from drupal, it give permission denied. Forbidden You don'...
0
votes
1answer
152 views

Handle file requests

I'd like to be able to intercept calls to files (.pdf for instance) in order to run some custom code before the user accesses/downloads the file, and add a cover page accordingly. From what I ...
1
vote
2answers
4k views

Apache AddDefaultCharset utf-8 - filename not saving in utf-8

Using file field to upload image which has utf-8 filename, but when it is uploaded to site filename is not saving in utf-8 format.But original name is saved as link in database making it not found ...
5
votes
2answers
16k views

Can't edit settings.php in Drupal 7 - Premission Denied - Can't Write to File via Cpanel File Manager

Trying to edit settings.php via Cpanel File Manager I can CHMOD the file to anything I want and back but can't write to it. I get the following message: Could not write /home/testing&#...
3
votes
0answers
685 views

How to pipe file uploads to subdomain?

I've got a Drupal 7 site on Apache and Varnish, sitting behind the CloudFlare CDN. Everythin on mysite.com goes through cloudflare... I also have a "direct access" subdomain set up at direct.mysite....
0
votes
0answers
49 views

What are the appropriate file security settings and Apache settings for Drupal sites running on a VPS?

I would be grateful for some help on this one - I have looked at the other posts on this subject with interest, but they don't seem quite to fit my situation. I'm not a great Unix expert, but there ...
0
votes
1answer
301 views

Changing default file permissions for group?

I'm not super familiar with the permissions structure in Drupal 7 so I'm not sure if this is actually an Apache question or a Drupal question. I have a style.css file in /sites/all/themes/mytheme/...
0
votes
1answer
84 views

Is it possible to serve a theme from outside the web root?

We have a need to keep a proprietary theme in a directory that isn't readable or writable by a client. At the same time, the client needs to be able to do standard Drupal updates (ie, they will have ...
0
votes
2answers
704 views

CSS Mime Type transferred as Zip in Chrome - 15 second delay

Resource interpreted as Stylesheet but transferred with MIME type application/x-gzip: "http://www.energyjustice.net/modules/system/system.base.css?m7sb47". I turned off the CSS aggregate and ...
3
votes
0answers
1k views

How to set up permissions while using dso as PHP handler? [duplicate]

I'm having all kinds of troubles while setting up my site online. I can't upload new modules and if I try caching this is what I get: Warning: file_put_contents(temporary://filedwZLkV) [function....
0
votes
1answer
67 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 ...
0
votes
1answer
409 views

control over what prints on first and second page of pdf

I am generating pdf using dompdf and my website is running on Drupal 6. I have a requirement wherein I need to print part of my html on first page and some part on second page in some cases. Also ...
5
votes
1answer
1k views

Bulk saving nodes with a file field

I'm in the progress of creating a bulk upload function for a Drupal site. Using flash I'm able to upload the files to a specific url that should be able to handle the files. What I want to do, is not ...
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.
1
vote
2answers
366 views

Mapping existing file against a new content type

I am facing a situation here. I have a content type A with an image field(field_upload_snaps) in it. There is another content type B which also contains an image field(field_valid_snaps). Now user ...
0
votes
1answer
351 views

Picking image from server: FileField_Sources not working

I currently have some nodes that use images. Problem is: every time I want to choose an image, I have to upload it again. It would be much better if I could just use a path picker, which could show ...
0
votes
3answers
901 views

How to set and use direct files folder path in a multisite installation

Drupal 8 multisite install where First site is on a subdomain one.example.com Second site is in a subfolder one.example.com/two How can files folder for both sites to be accessible via URL/files ...
0
votes
2answers
57 views

Filebrowser thumbnails “can not create img for private://”

I am using Drupal 8.7.5 and PHP 7.3.7 running on Apache 2.4.6. UPDATE: I'm trying to make available a library of images to the public. I chose the content type of 'Directory listing' to do this. In ...
1
vote
3answers
454 views

Uploading file, parsing and displaying data

For a site i am building right now, there is one component that I would want the user to upload a file, where it will be parsed (currently a python script, but can be ported to something else). The ...
5
votes
2answers
2k views

Displaying the contents of a document file (doc, docx, etc.)

I'm looking for a way to display the contents of an uploaded document file such as a .docx file. In Drupal 6 I used the iPaper module which did the trick as all I needed was api code to connect ...
6
votes
2answers
2k views

Reasons for subsequent Broken/missing handler in Views?

In the process of upgrading Drupal 6.x to 7.x I'm facing a problem that makes all my views show nothing relevant. (I believe the problem is here but I'm not sure, I don't know. That's why I'm asking): ...
0
votes
1answer
36 views

Additional file entity fields in widget_form

I've added additional fields to my file entity types and would like to have them in upload widget, just like file description. How can I add my custom fields element using field_widget_form_alter? (...
1
vote
1answer
146 views

How to set the public file path to migrate site files and images through Migrate Drupal UI

I am working on migrating a drupal 7 site to drupal 8 site that has image fields in content types, as well as some pdf files that I am trying to migrate through the Migrate UI. None of those files are ...
0
votes
1answer
336 views

Programmtically add image to custom image field User

I can't figure out how to add image to a custom image field on a sepcific user. $f = file_save_data($user['thumbnailphoto'][0], 'private://profile/'. $data['name'] .'.jpg', FILE_EXISTS_REPLACE); ...
0
votes
1answer
424 views

Preview is not showing after upload

When i am trying to upload image as a Authenticate user, After upload i am not able to see preview. fields got disappear fully. If i try to do as a admin, i am able to see that. Any suggestions?
10
votes
2answers
9k views

How to get the url of a file field of a given node?

$node->field_file gives me a FileFieldItemList while the first entry seems to be a FileItem. $node->field_file->getValue() gives me an integer (I guess the file id). How can I actually get ...
1
vote
1answer
451 views

How do I fix File Upload After Upgrading to PHP 7

I know this question has been asked a thousand times in a thousand different ways, but none of those solutions have worked for me. Problem: I recently updated from php5 to php7. Whenever I attempt to ...
0
votes
0answers
9 views

Webform includes attachments only on manual resend, but not on initial form submission?

Using Webform and Mimemail to send HTML emails and uploaded files attached to emails. When submitting the form, the file is not attached to the email. The box is ticked: But if you edit the ...
4
votes
2answers
384 views

Detect when 'Remove' is clicked on a file widget form element?

I have a handful of file fields that have the following default Drupal behavior: User can upload a file User can upload another file in place User can remove file Standard config. Whats happening is ...
0
votes
1answer
395 views

Move file uploads in webform into subdirectory using hook_webform_submission_presave

I'm using the webform_multiple_file module to let users upload files in a webform. There is a second form component in that form. It's a number. I want to change the upload directory, which is defined ...
0
votes
1answer
331 views

Keep file download list of each authenticated users

I have a content type "Application" and each "Application" content has a downloadable file. I'd like to keep the downloaded file list, actually node list, & count for each authenticated users. ...
1
vote
1answer
978 views

Can't load library path files

I have added a library to the libraries folder. I have the Libraries API module installed and I wrote this code: function my_module_libraries_info() { $libraries['google-api-php-client'] = array( ...
3
votes
2answers
781 views

How to scan a directory to list all sub folders not files

I have a folder (root folder) with thousands of sub folders and *.json files inside sub folders. How can I get list of sub folder names inside folder (root folder) using file_scan_directory?
0
votes
2answers
966 views

Private file system, The upload directory private://webform/XXXX/_sid_ for the file field could not be created or is not accessible

I am trying to set up the private file system for drupal 8. I have created a private folder /home/user/public_html/private_files with permissions set to 777 in settings.php i uncommented the $...
0
votes
1answer
371 views

Custom feed tamper plugin to convert an image GUID into a URI

I have a feed importer for image files, which stores a column in my source csv as the GUID of the final files in Drupal. I also have another importer for, say, articles. In the articles csv, there is ...
0
votes
0answers
36 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/[...
-1
votes
1answer
527 views

message: “No PDF generation tool found! Please dowload a supported PHP PDF generation tool … ”

I installed print module but I got this message when I wanted to install PDF section, I was reviewing pdf modules such as dompdf mPDF TCPDF wkhtmltopdf but any works when I want to install them, ...
2
votes
1answer
33 views

File upload via REST returns 403

I've been attempting to get a file to upload using REST services and have been having a heck of a time getting it to work. All attempts come back as 403 (Forbidden). Here's the code: export const ...
1
vote
1answer
303 views

How do I alter images being added via IMCE CKEditor plugin?

I just wanted to share my solution since I did not find any clue or different way of fixing the following problem: Formerly, you could add a default class/ alter attributes of newly inserted images (...