Static files used on websites which could be video, images, pdfs etc.

learn more… | top users | synonyms

0
votes
0answers
15 views

archiver_get_archiver() returns FASLE

I was doing some zip processing and came through the code which update_manager_archive_extract() uses. This is the code:- $path_to_zip = '/some-local-path/testfile.zip'; $archiver = ...
0
votes
0answers
12 views

File download access, tracking, and count

Requirements: Only authenticated users can download the file. Keep track of which users have downloaded the file. Count how many times the file has been downloaded. There are a few different ...
0
votes
1answer
19 views

Issues with file upload fields

I'm working on a site where someone did a lot of security updates. After reviewing the site, we found a bug. When you try creating a node with a file upload, when you click the save button, instead of ...
0
votes
0answers
12 views

Views sort by file field delta

I've seen this problem hinted at in several other questions but all the answers have skirted the problem in some way, not answering how/if this can be done. I have an image field on a node ( using ...
0
votes
0answers
4 views

drupal_realpath in ajax php script not working

I have an AJAX script, which boostraps the drupal system to get access to the drupal functions. The I like to convert a file's internal uri (e.g. "private://test.jpg") to a local filename (e.g. ...
0
votes
1answer
12 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
25 views

Remove language prefix from file url on drupal 6

We have a multilingual site on Drupal 6. which seems to work fine, we created a rotor view on the default language (en). This views looks great on default language which loads without any language ...
1
vote
1answer
22 views

Drupal 7 Weform 4 attach file message stays even though correct size file is updated

I have set a file size limit of 4mb for the file type field. Current behavior When a file greater than 4mb is attached (10mb.jpg) and upload button is clicked, there is a message shown that mentions. ...
0
votes
0answers
15 views

Referencing public files when editing nodes

Right now when I want to include an image into a node I have to specify a path like <img src="/sites/example.com/files/profile.jpg" /> The problem is if the Public file system path ...
0
votes
1answer
20 views

Rendering a generic file field containing an image

Drupal 7.34 Media 7.x-1.4 Views 7.x-3.8 I have a generic file field. Sometimes the uploaded file is an image, and in these cases I want to render it in a View as a thumbnail. So I do the following: ...
0
votes
0answers
17 views

Custom file type with image field

I've attached an image field to my custom file type to add additional information to my uploaded PDFs. The file field is attached to the node entity. But everytime I upload a PDF for my custom file ...
0
votes
1answer
14 views

Accessing files from a local cdn

I know that drupal comes along with 2 default stream-wrappers(public and private). What I want to achieve is to have my images placed in an another server, where they can be accessed by a url similar ...
1
vote
2answers
71 views

Files (±50MB, audio) automatically repetitively deleted (after ± a couple of hours-days?)

Might I ask you what can be the cause and solution of: the automatic dissapearing of "large" files (±50MB, such as an audio file) that I have manually put into the root folder of my Drupal ...
0
votes
2answers
57 views

Download file field dependent on user role vs role field values

I have a type downloadable_item which has a field field_roles_allowed that is based on the Role Field Module. My goal is to have a field_download of file type that will show the file for download if ...
1
vote
2answers
23 views

Upload File upload and generate url

I have a site where there are several links to a single file. Is there a module that allows me to upload a file into the CMS, generate a link and use it as for these links? The Module would need to ...
2
votes
2answers
132 views

How can I rename uploaded files programatically? (auto-rename image files)

I am aware that the File Paths module allows administrators to use tokens to set patterns for renaming files, but as of writing (Jan 2015) there are more than 100 bugs in the queue and no updates to ...
1
vote
1answer
21 views

Adding accept attribute to managed_file field to specify file types client-side

I've got a file field in a custom form like this: $form['image_upload'] = array( '#type' => 'managed_file', '#title' => t('Image upload'), '#description' => t('Upload png ...
1
vote
2answers
42 views

How to retrieve files from url when they have whitespace into filename?

I need to import a lot of images/pdf from urls, and then save them to a file/image field into nodes. To achieve that, I am using this script (example with images): if($image!='\N'){ ...
0
votes
1answer
24 views

Drupal can not open pdf file

I am trying to open a pdf file from server to be shown for the user, but it seems that for somereason I can not open it (it works on different enviroment). What am I doing wrong or what should I do to ...
0
votes
0answers
23 views

Not able to upload file in content type form without filling all required fields [duplicate]

Uploading a file in node/add/mycontenttype is failing and displaying required field validation errors for fields that have not been filled out. If I fill all required field then upload the file it ...
0
votes
0answers
8 views

How does file_entity_file_download work with file_file_download?

I've recently upgraded my file_entity module and now have access woes on managed private files. file_file_download() is granting permissions, as it should, by looking up whether the user has access ...
1
vote
0answers
14 views

Drupal 7 - Change of Files/Image location to a new organized structure

I would like to clean up savely the exstising files Drupal 7 structure and change the location of my exsisting Files/Image to a new organized structure e.g. in files/content-type/year/node-id Would ...
1
vote
1answer
39 views

handling file upload for drupal 6

I have a question about handling file uploads. I am trying to implement a form that will allow the user to upload a file. I do not need to store the file, though. I just need to take the uploaded ...
0
votes
1answer
45 views

How can I overwrite uploaded file via Filefield?

By default in Drupal 7, if I upload image.jpg via a file field in my node, save the node and then edit that same node and re-upload image.jpg, it will name it image_0.jpg. I want to replace the image ...
0
votes
0answers
15 views

Saving a file with a custom filename

I have a custom form that uploads a couple of images used in static designs. What's the best means of having these files uploaded to a directory under public:// with a hardcoded filename to be set on ...
1
vote
1answer
189 views

Private files not found 404 error

My installation is Drupal 7 + Nginx + Varnish cache My private files path: sites/default/files/private/demo.img URL in browser: system/files/demo.img When I try to open private file: ...
0
votes
1answer
24 views

How to change the directory of file_create_url to default for a custom domain

Suppose, we have a file: /sites/default/files/picture.jpg Drupal is installed into a subdirectory: /drupal. There are 2 domains, attached to the site: exchange exchange-test (uses different DB) ...
0
votes
2answers
66 views

How to attach files to node instead of uploading?

I have 2 content types, Files and Events. Files content type is used to upload files like Image, PDF, Doc etc. Events content type has a field to attach a document which is uploaded by files content ...
1
vote
0answers
38 views

Advice for Image Management with New Site

I am looking for the best image management options for a new Drupal site. The original site has several thousand images, and a dynamic site is expected to explode that number to tens of thousands. ...
0
votes
1answer
36 views

How to Scan directory for list of sub folder names not files inside sub folder

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
0answers
31 views

path url for create image in drupal module

I want to create custom image by merging some image(this is not my porblem),I did it in local php file and when I want implement it in in custom module the images not created ...
0
votes
2answers
306 views

How to get a list of all javascript files in a directory

Is it possible to get a list of all the javascript files in the libraries directory? So far I have tried using files_scan directory but it's not returning anything: $dir = base_path() . ...
0
votes
2answers
23 views

From single site to multi site of an existing site broke all pages images

I had a single site that is running in prod. We wanted to use the multi site feature of Drupal 7 because a few site will be using the same core code. So I moved the default/files/ to mysite.com/files ...
0
votes
0answers
19 views

Scald File + Search API Attachments

is it possible to have files uploaded by Scald File (https://www.drupal.org/project/scald_file) indexed and extracted by search api attachments using solr as its extractor? I tried it and it does not ...
0
votes
1answer
33 views

Is there a filter/search option available for navigating the 'Find Content > Files' page?

I have a site with thousands of files uploaded, and Drupal's admin view doesn't seem to offer a comprehensive filter for the Files view like it does with the Content view. There also apparently isn't ...
4
votes
1answer
43 views

Allow .oft file extension

How to allow media module to support .oft file extension? Checked supported file extensions in includes/file.mimetypes.inc. It does not have oft extension listed. How can I add it without hacking ...
0
votes
1answer
22 views

Migration: Combine Profile2 and file migration

I need to migrate profiles from an external database (not drupal) to Drupal 7. The target system uses Profile2 profiles. I already wrote the migration of all the "primitive" fields with the help of ...
1
vote
0answers
37 views

PECL uploadprogress bar does appears But doesnt move

I installed the PECL uploadprogress bar in php and this is working fine but when I start uploading a file it ends up getting stuck and dissapearing when the file is uploaded. This is what i see when ...
0
votes
1answer
74 views

Webform with File upload field throwing “… field is required” error

I have created a Webform, which has two file fields (i.e. Attach document 1 and Attach document 2). Both of them are mandatory and files are to be uploaded in the "Private" folder. Now when someone ...
0
votes
1answer
52 views

How to add a javascript field to custom content type

I have a custom content type called 'Visualisation'. I would like a user to be able to upload their own javascript file for each instance of the content type. I would then like to load this script on ...
0
votes
0answers
34 views

File Sharing - private and public

We have a museum website that is used solely for internal purposes (Roles = Employees, Senior Staff, Director, and board members). All accounts are created by admin and are for museum related ...
0
votes
1answer
49 views

How to scrape content from a Drupal Site?

I am a victim of Drupageddon on one of my sites and even though I patched Drupal core (maybe not fast enough) recently my Drupal database got completely messed up and my webhoster confirmed there were ...
0
votes
0answers
18 views

How to change file field destination

i'm using Drupal 7 and have an article content type with a file field for article pdfs (field_pdf_file). Currently this field points to the Drupal 7 private file system so uses the stream private:// . ...
0
votes
1answer
60 views

Commerce File won't let anyone download files

I've got a website running Drupal 7.32 with Drupal Commerce. I want to let users download files so I've got the Commerce Licence and Commerce File modules installed and I've them working for a while, ...
0
votes
1answer
39 views

link to node field on another content type

I have a field that uploads a pdf, I want to get the uri in another node and content type to create a link. Is this possible to do without knowing the id of the node (so not using node_load) but by ...
0
votes
1answer
39 views

Error message when deleting folders/files on Maintenance mode

I turn the site in maintenance mode for update Drupal Core from 7.30 to 7.32. I follow the step on Drupal docmentation to delete all folders and files, beside "site" folder(on step 5). However, I got ...
1
vote
3answers
2k views

My Drupal was hacked: Remote Code Execution – base64_decode() with ‘PCT4BA6ODSE_’

today I woke up surprised that my website was hacked. I found scripts like this in several files of my Drupal instalation ...
0
votes
1answer
53 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
96 views

Large file uploads stop immediately, 404 error

I am having a weird problem with uploading large files in the Drupal admin's file field. I have the size limit set to 500 MB. I also have the php.ini settings for upload size, post size, and memory ...
0
votes
0answers
54 views

Replace the file with same name

With reference to post for the validation function in managed_file field, but i am facing an issue with file_desitination() $file->destination = ...