All Questions
798 questions
0
votes
1
answer
148
views
Remove paper size options on node add forms
Node add forms show some paper size options no matter who the user is, even regular authenticated users. It seems to be part of the Printer, email and PDF versions module.
I added the following code ...
0
votes
1
answer
648
views
Unresolved dependency File Entity error
I'm trying to run a serious of updates on Drupal.
However, I'm seeing to be running into the following error:
Unresolved dependency File Entity (Version >7.x-2.0 required)
Media requires this ...
0
votes
1
answer
356
views
Adding a hook to a contrib module
I am trying to hook into the Print module after to call a custom function after the pdf is generated. I've got this working by simply patching a call back on the wkhtmltopdf.pages.inc:
if (!empty($...
0
votes
1
answer
38
views
Migrate rows of files for nodes
I've got a CSV where every row contains details about a node and then a URL to a file.
Each of the nodes rows has an id number associated representing each specific node.
So eg:
id, node name, file ...
0
votes
1
answer
270
views
How to assign alt text to current inline images
Let me set the scope first, these images are not uploaded from an image field, they are uploaded from CKeditor, via imce or ckeditor_image2. Therefore, they are in node body, together with other text (...
1
vote
1
answer
860
views
Trigger an event when file is upload on managed_file field
I'm trying to trigger an javascript function when a user select an image for a managed_file field and click on the upload button, not the submit one.Except that in Drupal 7, managed_filr field do not ...
0
votes
1
answer
112
views
Hide Uploaded Files in File Field in Node Edit Form
I have a custom content type, Contacts. Under contacts I have a custom File field, Contracts.
I want to hide the any file that have been uploaded under the File Field, Contracts in the node edit form....
0
votes
1
answer
83
views
Moving file structure and documents from Static site to Drupal
I have a static site that we have created content types for and moved most of the content over. There are links leading back to the old static site documents. I am looking for a good way to bring ...
0
votes
1
answer
573
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?
0
votes
2
answers
544
views
PDF Module, PDF full pageheight or full scroll
I managed to get a PDF in a content type and to show the full PDF. I do this with the PDF module in drupal 7.
But I want't the height of 1 page (A4 always) or just the full height of the document.
...
1
vote
0
answers
477
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 ...
1
vote
1
answer
7k
views
Unable to jump to a specific spot (seek) when mp4 or mp3 is in private field
I'm serving .mp4 videos and .mp3 audios using private download (field's upload destination: Private files), and they play OK on native html5 player, but seeking doesn't work, as in I can't jump to the ...
1
vote
0
answers
106
views
How to upload multiple images in a single browse option in webform file component field?
I have added file field in webform content and tried to browse multiple images and upload it @once, But webform file field only supports only one image while clicking single browse. Tried Installing ...
0
votes
0
answers
66
views
Open PDF created with Webform2PDF in a new browser tab
I have installed the Webform2PDF module and the PDF is created and can be found under the Results tab.
However, I would really need to open the created PDF in a new tab on submission. How can I do ...
0
votes
2
answers
58
views
How to require a user to be logged in to access files
On my website I currently have a way for users to upload files. It has been brought to my attention that these files are showing up in search engines. I'm fairly new and this is not a desired effect....
0
votes
1
answer
630
views
How to show upload date fore each file
I have a content type called 'Documents' which has 2 fields: title and file.
There can be attached multiple files the file field.
But how can I show the upload date for every single file?
I have ...
0
votes
1
answer
88
views
Monthly change images directory Drupal 8
I am working on a news portal site.
We have a lot of posts and also a lot of pictures are saved daily.
At the moment, the size of /sites/default/files directory is around 6GB and contains almost 23k ...
0
votes
1
answer
28
views
How to delete old images uploaded via FAPI
Consider the following bit of code in my custom module... It allows a user to upload an image, saves the fid as a variable, and in a custom submit function, it makes sure that the file in the ...
0
votes
1
answer
815
views
Trouble saving canvas as image to the public file directory
I've created a canvas via jQuery and need to save it back to the public file directory as an image, so I can access it like any other image.
I can create the file and save it, into the same file ...
0
votes
1
answer
228
views
How to resolve my error when uploading files?
In our Drupal site when we try to upload .zip file having 210MB size, we are getting an error saying:
The file NewEdition105.zip could not be saved. An unknown error has occurred.
The file in the Sai ...
2
votes
2
answers
2k
views
Server Configuration causes file uploads to fail
I have a drupal 7 site running on a Redhat shared hosting environment that uses zend php. I am having problems with file upload on content types and webforms that accepts various file types up to ...
0
votes
1
answer
38
views
Irreversible error when trying to upload image (too big) in a clone
In all of my node types I have several image fields. If I delete one image and then uploads a new one and then repeats this for a second and third image field, all works as expected.
BUT if I do this ...
2
votes
2
answers
116
views
Where to store JS and CSS that is not associated with a module?
I've been given a ZIP file with the JS, CSS, HTML, and assets for a stand-alone jQuery application. We would like to host this application through our Drupal 7 site hosted on Acquia Cloud. I am ...
3
votes
1
answer
274
views
How do I utilize Drupal commerce to sell large files stored on Amazon S3
I am working on a project for work that involves replacing a current "tape and staple" file delivery system. It's a Drupal site, but with many many third party outdated VERY unstable software. However,...
0
votes
1
answer
386
views
Cron job to transfer files to remote server
How would I go about scheduling a monthly file transfer (via FTP) to send files in a specific directory on my remote VPS to a server on my internal Corporate network? Once files are transferred, I'd ...
6
votes
2
answers
907
views
Drupal files folder owner/group for CentOS?
This is my first time installing Drupal on CentOS. I know for Ubuntu it needs to be www-data as the /files folder owner, but what is it for CentOS?
0
votes
1
answer
661
views
“&” displaying as “&”
I'm Using File (Field) Paths
“&” displaying as “&” in the file name
i tried to solve it by change the the display of the field to plain text and use the token view mode but nothing change
...
-1
votes
1
answer
644
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, ...
1
vote
1
answer
555
views
How to edit image URL in node field?
I am using Media Browser widget for uploading and editing images in nodes. My images are stored using image fields. Is it possible to edit URL of the image after uploading? I would need to achieve:
...
2
votes
3
answers
883
views
Lightest setup to sell only digital content with no physical products? [closed]
I'm looking for recommendations on how to setup Drupal 7 with the fewest modules so I can charge users to Buy Digital Content (Book Pages) on my site.
I will eventually have several books, and users ...
1
vote
2
answers
1k
views
How to concatenate all token values of a list in a single field within a Rules loop?
I am attempting to send a list of uploaded files on a newly created node via email.
In a content type, I have a File Field that allows unlimited values.
Within Rules, I created a loop calling the ...
0
votes
0
answers
43
views
Adding file description field to already existing records
I have a site with various hundreds of a particular content type. This content type contains a field of type file. We have decided we want to display a description rather than the filename. I have ...
3
votes
1
answer
67
views
How to protect thumbnail and library images from media browser from being deleted?
I have a Drupal 7 site where authenticated users can create a webpage to raise money for a charity. They can add a picture from the media library using the media browser. However, if they delete their ...
1
vote
1
answer
711
views
admin/content/file missing
I have some problems with files. Everyone is talking about admin/content/file, but I just don't have the link under /admin/content, and going to the url by hand returns me to admin/content.
I seem ...
1
vote
1
answer
420
views
How to delete folder along with the files from database also?
I want to delete selected folder along with all files inside that folder. I tried by using file_unmanaged_delete_recursive() It will delete folders and files but it is not removing database entry of ...
0
votes
1
answer
78
views
How do I download an image/file to a specified location on the disk?
I want to provide the functionality to the users to download the images/files to their system but not with direct download but with a dialog where they tell the location where they want to download ...
2
votes
0
answers
35
views
Add file path to entity programmatically [duplicate]
I am creating an entity programatically, I want to set a file in entity, I have tried following method.
$file_path = '/sites/default/files/abc123.pdf';
$values = array(
'type' => 'review',
...
0
votes
1
answer
182
views
I can't access private files in CKEditor
I have this site someone else has worked on and they've asked me to see if I could fix something.
This site has private files available to users after they've filled in a form (they then get a email ...
0
votes
2
answers
2k
views
How to delete Unused Images? [duplicate]
I am using Drupal 7. When I test my page speed in Google PageSpeed Tools, it says to compress the images. After that I compress the image and uploaded it. The uploaded image placed in files folder ...
1
vote
1
answer
708
views
Increase upload file size by content type
I have worked with our host to increase our upload file size to 2GB. However, on one page it still states that the files must be less than 3MB. How do I change that? I am a Drupal novice so please ...
0
votes
1
answer
62
views
From time to time, the system does not find a file that exists
From time to time (1 in 20 pages or so), I receive the following Drupal error:
Warning: file_get_contents(/sites/all/themes/MYTEMPLATE/lightGallery/dist/js/lightgallery.js):
failed to open stream: No ...
0
votes
1
answer
23
views
(File) File: Path outputs only first item
I have a view that renders a node page as a view, that node has e.g. 100 images, so technically they are all on same node, so then we go to views fields settings and untick the option to show images ...
0
votes
1
answer
656
views
Why file name and uri of the file in database are different?
I am uploading the files to the folder by using file_save_upload and file_move to achieve this. Its working fine but a problem arises while saving in database. I have used FILE_EXISTS_RENAME argument,...
0
votes
0
answers
647
views
Adding zip archives to the Document File Type
I have many PDF documents in my site, assigned to the Document File Type by the File Entity Module.
I have added a few fields to the content type, thus allowing nice interface in showing all PDF ...
1
vote
1
answer
391
views
How do I attach a file to a file field when saving (update/insert) a node?
After creating programmatically a PDF file with TCPDF, I am trying to attach it to my field "file_fichier", here is what my code looks like
/**
* Implements hook_node_presave().
*/
function ...
0
votes
1
answer
153
views
How to change the functionality of FILE_EXISTS_RENAME?
I am using files_save_upload function to save the file. Here, I can use FILE_EXISTS_RENAME this to rename the current file name if already this name existed. By default it rename by appending ...
0
votes
0
answers
35
views
How to give weigthage while creating a folder?
I am creating folders in public:// folder by using file_prepare_directory function. I will create a folder while installing a module, So I want to keep that particular folder always bottom. Whenever I ...
1
vote
1
answer
94
views
Default File Display is Using Incorrect Image Style
I'm using Media-7.x-2.0-beta1. When adding an image with the default file display (default file display is identical to Original), it uses the "Medium" thumbnail display. I've checked to make sure the ...
0
votes
1
answer
3k
views
How to delete files from public folder?
I am storing some files in public folder, programmatically I want to delete those files through the provided path. I tried using below code, but not worked.
function delete_public_files($arg1, $arg2)...
0
votes
1
answer
21
views
Can I pass file name as a parameter to menus page arguments?
I have a hyperlink, in that I am passing the dynamic foldernames and filenames as url like below.
$data .= '<div><a href="'. $base_url.'/custom/delete/'.$foldnames.'/' .$filenames .'">' ...