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
1
vote
1answer
635 views

How do I attach an existing file to a node?

Here's my problem. I have a D6 site which has been in production for a number of years, and in consequence has used various methods (and modules) for displaying images within body text of book pages. ...
1
vote
2answers
458 views

How do I use print to generate a PDF of all entities referencing a specific node?

I'm trying to use the Print module to generate pdf's and epubs of the stories on my site. However, I need to get Print to generate these files from the story page and then generate the pdf with ALL ...
0
votes
0answers
13 views

Add upload/processing status bar/throbber

I am new to Drupal/web development and I have been trying to create a module to add files upload menu. Once the files are uploaded, they undergo processing and a message is displayed upon completion ...
0
votes
1answer
840 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/...
0
votes
1answer
423 views

Organize node file attachments into groups

I have a content type with multiple file attachments to download. Is there a module to give authors the ability to divide all the attachments into groups, writing a title for every group, just like ...
0
votes
1answer
607 views

Module webform2pdf modify template

I have sereval webforms et each webform send a mail with a pdf. I would like to do a template for each webform. I use webform2pdf in Drupal 7 to send pdf by email. How can i do that ?
3
votes
2answers
2k views

Storing images as nodes

I am building a Drupal 7 platform where users can share images. In a nutshell, people should be able to comment on images and like them. The way I realized this is by creating a custom content type ...
1
vote
1answer
555 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['...
2
votes
2answers
528 views

How can I update file attachment and keep filename?

I understand changes of file attaching in D7, but problem is, if I delete and re-upload changed file, the deleted file is still on server and re-uploaded filename gets changed. If I understand ...
2
votes
1answer
276 views

How can I create an alias to point to an uploaded file?

Users uploading a file within content create a name like my_site.com/sites/default/files/import/CrazyLongNamefile.pdf They would like to alias it for referencing in other media (print) like my_site....
0
votes
1answer
529 views

create link to download file

I'm adapting a drupal module to my need. It permit to upload a pdf to insert it into a node add form in an iframe to display the file. I've need also to insert a link to download the previous uploaded ...
1
vote
2answers
421 views

TinyIMCE not working: looking for image files

TinyIMCE is not working: At Hostgator, I cannot access the images that I know are in there (at sites/default/files/field/image and at sites/default/files/pictures). In the text editor, I select the ...
2
votes
1answer
476 views

How to redirect all images in the files folder to a default file?

Because we work with DTAP environments, our developers work on their own laptops. To get a good view of the live environment, we copy the PROD database and the files to our own laptop. However, this ...
1
vote
1answer
625 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 ...
0
votes
0answers
16 views

Images randomly not found

I have an issue on Drupal 8 with images randomly not found. I am actually not sure if the issue comes directly from Drupal. I am developing for my organisation a website currently quite simple with ...
1
vote
2answers
39 views

Permit only one role to download files

I'm trying to set up a new D8 site. It needs to include some "subscriber only" type functionality. There is one content type which is little more than a title, a file, and one extra field ...
0
votes
2answers
28 views

File size on View

Is there a way to display the file's size next to it in a View? This is for a File field in Drupal 8. I tried the advice (for D7) here, but I received this error. The handler for this item is broken ...
2
votes
1answer
542 views

How to get an export option as a pdf for views?

I am using views on my Drupal site I can able to export my view in csv, but I am not able export my views as pdf I need to export my view as pdf. Any suggestions on this it will be very helpful, ...
1
vote
1answer
4k views

Upload an Image File using REST API (using multipart/form-data)

I want to send an image file using REST API in Drupal 8 along with a registration form. I have built a custom API to save the registration form. For the files i have created another API to save data ...
0
votes
2answers
509 views

Limit the number of uploads per image field depending of role

I need a hook (or something similar) where I can set the number of image uploads depending of the role of the user. In the settings of the field there is no way to set the maximum number of values ...
0
votes
2answers
946 views

How to open file in new tab instead of download when submitting form?

The code below downloads the current file, I need it to open the file in a new tab, what needs to be added in order to do so? public function submitForm(array &$form, FormStateInterface $...
1
vote
1answer
1k views

What is the suitable file permission for 'files'?

I have written this small bash script to rebuild D6.22 file permissions: #!/bin/bash cd /path/to/drupal chown -R bob:www-data . find . -type d -exec chmod u=rwx,g=rx,o= {} \; find . -type f -exec ...
0
votes
0answers
31 views

system_retrieve_file() not returning fid

when I'm calling system_retrieve_file like: $thumbnail = system_retrieve_file($thumbnail_url, NULL, TRUE, FileSystemInterface::EXISTS_REPLACE); It downloads the image into the file system, but when ...
0
votes
1answer
557 views

How do I create a file download popup form?

I am new to drupal, and I want to create a popup form with with form fields for name and email, and a buttom to download and to close the popup. When users click on the download link, the popup form ...
0
votes
1answer
11 views

How would you convert a link to a media item to the file URL in a menu?

I would like to be able to link to media in a Drupal menu and have the link converted to a file url. Is this possible?
0
votes
1answer
500 views

How to file_save_data with utf encoding?

file_save_data is saving files with ANSI encoding. I want utf8. How can I specify encoding?
0
votes
2answers
380 views

Can I use plupload to load multiple image files into a single image field

I have an image file field on my Drupal 7 site that allows users to add 4 images. I would like to give my users the ability to load all 4 images at once. I have discovered the plupload module and ...
12
votes
1answer
5k views

Load a file entity by URI

Is there a way to load a file by URI in Drupal 8 or Drupal 9? In Drupal 7 it is possible by the next example: $uri = 'public://file.xyz'; // Take a look at: file.inc::file_load_multiple $files = ...
0
votes
1answer
20 views

Create nodes from a JSON file uploaded in a form by an user

I've got this form: $form['import_json'] = [ '#type' => 'file', '#description' => $this->t('Allowed extensions: json'), '#title' => $this->t('Import your JSON\'s ...
2
votes
1answer
582 views

how to bypass video conversion for mp4 files?

I am using the Video module on my site, and would like a would like to bypass video conversion and a user uploads a file in MP4 format. Is there any way that the bypass video conversion? The reason ...
1
vote
4answers
512 views

Add another item by multivalued fields directly from node (or entity) view page

I have a file field which can have unlimited number of values. I am using File Entity module. As default, if users want to add more files, they must edit the node. I'm looking for a solution to give ...
1
vote
2answers
879 views

Amazon S3 for Stage / Production only?

Is it possible to use the Amazon S3 module for stage / production only? The site I'm building, is using features. So when I export my fields for the content types, I either have the option to select ...
0
votes
1answer
1k views

IMCE with Amazon S3

I'm having an issue configuring IMCE to rely on the Amazon S3 bucket pointed to by the AmazonS3 module: https://www.drupal.org/project/amazons3. I have successfully configured image fields to use the ...
1
vote
1answer
780 views

storage_api The file could not be uploaded

I'm attempting to upload a a file using a custom context type that uses the storage class i defined thru the storage_api module. For some reason the upload of an image to it is failing with "The file ...
2
votes
2answers
2k views

drupal module for uploading to s3

originally posted on stackexchange. Didn't get any replies. Then I recently found out there's a specific drupal stackexchange so here i am reposting. TIA! I have a drupal site and I plan to serve ...
1
vote
0answers
245 views

How to upload files in sites/all folder in a hosted website?

I want to edit some php files present in sites/all/themes/danland/ and add some css and js files in same location. I have checked by modifying in the localhost to see the affect and finally want these ...
1
vote
1answer
2k views

Unable to upload large files (>50mb) to Amazon S3 from D7 on EC2

I'm trying to configure Drupal to upload large videos (eventually goal is ~300mb, but currently testing with ~50mb files) to S3 through my Drupal site running on an EC2 instance. I have configured ...
0
votes
1answer
1k views

How to embed private videos hosted on Amazon S3/Cloudfront using JW Player module?

Have anyone tried using the signed url option provided by the new version of Amazon cloudfront with the JW Player module? I´m using Drupal 7. I´ve read that the idea of the signed url option is to ...
1
vote
2answers
764 views

How do I setup Drupal with EC2 scaling?

I want to scale my Drupal site and I was wondering how to approach it with Drupal and Amazon EC2. This is a bit related to How to use Drupal in the cloud with on demand instances. With Amazon, I can ...
0
votes
2answers
3k views

Change “Public file system path” with Amazon S3

I want to keep my media files, all files in the "default/files" folder in the Amazon S3 account. I've opened the "admin/config/media/file-system" page and there is the "Public file system path" field, ...
5
votes
3answers
4k views

Serve static files via S3

I'm developing a Drupal 7 website that will be served from multiple servers behind a load balancer. I want all static files generated by Drupal cache (JS, CSS, and also theme and modules images) to ...
3
votes
1answer
3k views

Move File Field storage from public:// to another stream wrapper (like s3://)

I've been looking around for this a bit, and it seems like it would be relatively easy in Drupal 7, since D7 supports stream wrappers, and Fields are part of core... but I can't find any documentation....
1
vote
0answers
1k views

File upload error using AmazonS3

I'm trying to use the AmazonS3 service to host videos from my Drupal site. I'm using: Drupal 7.16 AmazonS3 7.x-1.0-beta7 AWS SDK for PHP 7.x-5.4 Libraries 7.x-2.0 Video 7.x-2.8+3-dev I've also ...
0
votes
1answer
646 views

Easiest way to post videos directly to S3?

I am working on a video sharing site and I plan to use the Video module. Amazon S3 is also being used as the file system. The problem is how to override/extend it so the video file skips the ...
0
votes
1answer
326 views

Error when uploading file through Drush on S3 volume

I am using Amazon S3 volume to store the node's attachment. I keep having the following message: file_put_contents(public:///.htaccess): failed to open stream: "DrupalPublicStreamWrapper::stream_open"...
0
votes
1answer
75 views

amazons3-7-x-2.0, Multiple upload to S3, #upload_location wrong URI

I installed the brand new amazons3-7.x-2.0 published last week, and the process is not straightforward. I finally managed to have it works, and I have the CCK file field, with a typical remote #...
1
vote
1answer
155 views

AWS S3 Bucket - File Explorer Field

I'm looking for a file field module that will allow me to select files from an AWS S3 Bucket, but not upload them. A client of mine is going to be uploading csv files via ftp from a different ...
-2
votes
1answer
29 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 ...
2
votes
1answer
972 views

What is the proper way to set up an AWS Auto-Scale group? [closed]

What is the proper way to setup an EC2 Web Server with the aim of serving a site which experiences high demand once a month via 1 small EC2 for 90% of the time and then enter a load balanced group for ...
1
vote
0answers
53 views

Site wide invalid Imagepaths withe Amazon S3 and IMCE

I'm working on an already existing page to make some updates. In the process Drupal 7 changed the images paths in the nodes, resulting into wrong paths to images. The only thing I did that would ...

1
2 3 4 5
47