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

learn more… | top users | synonyms

0
votes
0answers
16 views

Is it possible to detect files of a specific type in a specific directory using JavaScript? [on hold]

I am trying to create a JavaScript program embedded within HTML that detects the number of .htm and .html files in a specific file directory. Is there a possible way to achieve this?
1
vote
1answer
31 views

Why is file_create_url() returning inconsistent values?

I'm experiencing an inconsistent behaviour in Drupal 7 on the function file_create_url(). I have one field collection with 4 fields in it. On the first field the function provides the correct file ...
1
vote
1answer
23 views

How to unzip or uncompress a file .epub on Drupal?

I've created a content type that upload files .epub on database. Now for some reason (to use epub on a mobile app) I need to get the file .epub uncompressed. It's like in my content type I upload a ...
0
votes
1answer
19 views

Migrate both public and private files

I am using Migrate Drupal-to-Drupal and migrating a D6 database to D7. In D6, I have private and public files. They are in one field. In D7, I have a public file field and a private file field. ...
0
votes
1answer
39 views

How to use function like 'rtrim' in drupal? [closed]

I need to remove extension from string, i'm wondering what function could do that ? Some like the rtrim($string,'string to remove') $string could be the filename I've added a file into database, ...
0
votes
1answer
23 views

Displaying Files in Browser

So I have a new OA site spun up and have some content available for the few users I have. One of the requests from the user's is to be able to view (and most likely edit) the documents via the web ...
0
votes
0answers
21 views

Change File description field type [closed]

When I add a "File" field in a Content type, I can mark the option, " Enable Description field". This "Description field" only let use direct input. I need to change this to a select field. I'm ...
1
vote
0answers
28 views

Form API multiplie file upload validation error

I have a simple form with a multiple file upload field. I am trying to validate the documents against extensions and file size. The validation seems to work, but now if I don't select any file (field ...
0
votes
0answers
26 views

How to upload files to be linked to in a text field

When editing a page, we would like to be able to say "Add file", upload a file and then link to it in the Text. Or mark some Text, say "Link" and choose from the media library. (Like it is out of the ...
0
votes
0answers
16 views

Upload to none public or private folders when using managed_file field type

Is there a way to use an arbitrary directory for uploading a file? One that is not the public or private folder? I do not mind if it doesn't save a record in the Database. $form['upload_logo'] = ...
0
votes
1answer
22 views

How I can management private files

My default download method is public, but I need save some file on private folder, I am doing this: //... $file = file_save_data($handle, 'private://example.zip', FILE_EXISTS_REPLACE); //... Now ...
0
votes
1answer
14 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
0answers
20 views

How do I add files to the solr index in Drupal 6?

I'm using Drupal 6, Solr 4.9.0 and Apache Solr module v 6.x-3.x. I'm trying to use Solr to index files attached to nodes, but it's not working. I'm using the Solr Attachments module but I know it's ...
0
votes
2answers
25 views

How to access and edit files from admin panel?

How i can acces my files without going to host control panel or by ftp. I mean if any module is for that to access and edit files from Admin panel.
0
votes
0answers
8 views

Drupal deletes all files from a multiple-file field on an error

In Drupal 7, I have a file field in a content type defined with a size limit of 8MB per file and unlimited files. That works fine, the problem is that when a file is uploaded that is 9 MB. Then, an ...
0
votes
1answer
39 views

How to create a directory during a module install?

I need to create a directory in public:// when the module is installed via file_prepare_directory(). I used this code in function mymodule_install(): $mydir = 'public://mydir'; ...
0
votes
1answer
28 views

How to create a link to a file in a module?

In Drupal 7 I have a custom module that create a file in public://company/my.csv but in my module admin interface I want to create link to this file in a status message : drupal_set_message('download ...
1
vote
0answers
88 views

Post/Upload file using Drupal Services Module without base64 (Using REST multipart/form-data )

I am sure its possible in Drupal also. Here is the reference for Java code http://stackoverflow.com/questions/5723429/use-rest-client-to-call-multipart-form-data-rest-web-service and ...
0
votes
2answers
45 views

How to upload a csv file with an admin form?

In a custom module, I created an admin form but I need an input to upload a csv file. When the file is uploaded I need to parse in and then I add data to db. I already made "add to db" and "parsing" ...
0
votes
0answers
34 views

admin/content/media/list - “Add file” and “Import media” not showing

I need to allow a type of editor role to upload files. I have given the role all the "Media" permissions, and they are able to access the /admin/content/media/list page and see all the media, and the ...
0
votes
0answers
23 views

Add +Indexes (with autoindex) to sites/default/files directories

On my site I've to add a custom directory in sites/default/files, like "sites/default/files/archive". A crawler has to index this directory and so I've to add a "+Indexes" option in Apache (with ...
0
votes
1answer
13 views

How to solve the “No file was uploaded.” when trying to use custom form field?

I get "No file uploaded" when I try to use a custom form in drupal .Below is the code which I have used to upload a file in drupal custom form. function ...
0
votes
1answer
23 views

How to hide path location in drupal 7

Hi how to hide path file in drupal now it looks like this: http://localhost/drupal/sites/default/files/document.pdf i what to change to look something like this: ...
0
votes
1answer
24 views

How to programatically change file user owner

I'm using drupal services module. I can upload files through web services but the problem is all created files has the same owner, that is, the user of the web services. I would like to change this ...
0
votes
0answers
25 views

How to use file_prepare_directory and make the file writable

I am writing some code which imports nodes programmatically. Part of this code involves importing files, which would then be turned into file entities and attached to files. I am having a permissions ...
0
votes
0answers
24 views

Link menu item to network path

I am trying to figure out a way to allow content editors to add menu items that link to Windows shared drive, example path: file:///w:/documents/001.pdf Any ideas how to best do this in Drupal 7?
0
votes
0answers
23 views

Add files to private directory?

I have set my "Private file system path" for uploaded private files (admin/config/media/file-system), but I am confused as to how to add any files to that directory. I expected to find a private files ...
0
votes
1answer
28 views

IMCE file upload dynamic path problem

I am trying to setup a filefield using imce to allow the user to upload files however I am having problems setting it up trying to get a unique folder for each node. So for example I have set the ...
0
votes
0answers
19 views

Help developing a module for managing unzipped files

I have a content type called resources and one of the fields is a file field where users can upload content such as a pdf, video, docx, swf etc... What I am trying to do is allow user to upload a ...
0
votes
0answers
24 views

How to programmatically update a file field

I have a file field (audio recordings) on a node. So all these files are located in sites/default/files/recordings. I have set in the settings that those files are now stored in subfolders by ...
0
votes
1answer
12 views

Soft and hard copies of a single product in Drupal Commerce?

I am setting up products for an online store using Drupal Commerce. Some of the products (eg. books, music) require an option for both hard copies and soft copies so that customers can choose one or ...
0
votes
0answers
36 views

Entityform send uploaded files as link and not as an email attachment

I am using Entityform to send email notification to admin when visitors submit a form with an uploaded PDF file. How do you get the uploaded file to be provided as an email attachment and not as link? ...
0
votes
1answer
24 views

How can I attach multiple pdfs to drupal_mail() function?

Was doing something like this global $base_url; $uri = $base_url . '/sites/default/files/test.pdf'; if(!empty($mail_content)) { /*send mail */ $to ...
1
vote
1answer
36 views

How to Make File Description Field Required?

Use case: Users who are authorized to use the edit page are required To upload at least one file Must have an associated description with the file. Plus: How can I edit "Description" to display ...
0
votes
0answers
34 views

EVA field: file entities filtered by taxonomy term of attaching node

I have a node type 'XY' with a reference to a taxonomy vocabular 'country'. Also I have a reference to this vocabular in file entities. I have a view with an EVA display. This EVA field is attached ...
0
votes
1answer
23 views

File module not updating field

I have a File field for uploading pdfs. When editing the page, I remove the current pdf and upload a new pdf. The new pdf is uploaded to the server and add to the /sites/default/files folder and I can ...
0
votes
0answers
46 views

File uploads: Warning: session_start(): Cannot send session cookie - headers already sent

When I check watchdog, I have lots of PHP warnings like this: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at ...
0
votes
1answer
42 views

Files in the file_managed table with status of 0, not deleting on cron

I have a form where I am uploading files to the "sites/default/files" directory. I am using the managed_file type in my form API definition. This is all working fine and I notice that in the ...
0
votes
1answer
23 views

Display file description in view using Download Count

I have created a view to display my most download files on the site and allow users to download them, to do this I am using the download_file and download_count modules. The view should display a ...
0
votes
0answers
81 views

Add custom file field upload button

I'm adding a custom video file field to a content type. I use the hook_widget_form to add the file upload fields, but there's no submit input. I'm looking hook_form_alter to add the upload input and a ...
1
vote
0answers
25 views

Services 3 - how to create a file in the private files directory

Is there a way to save files to the file endpoint but to the private folder rather than the public.
0
votes
1answer
18 views

Upload file in system_settings_form in Drupal 6

I have a code that was supposed to upload 2 files: function lafemme_background_images_form() { $form = array(); $form['#attributes']['enctype'] = "multipart/form-data"; ...
0
votes
2answers
23 views

Forbid access to file page (view display mode = full)

I want to disable access to the view display page of file by url like file/fid. What's the good way for this? I have tried to use the hook_node_view() but it not called for the files.
0
votes
1answer
34 views

How to find content that uses a File (File Entity)?

Want to be able to see what content has file field(s) that refer to a specific file. Is this do-able using a View (with Relationships)? (had a go already, unsuccessful so far). Alternatively I'd ...
0
votes
0answers
9 views

Drupal file naming convention [duplicate]

I have to extend a Drupal project management project, and since I've only been working with PHP for not too long, I'm not very familiar with PHP naming convention, and practices, such as having an ...
2
votes
2answers
81 views

Custom module 'managed_file' variable info keeps disappearing

I have a custom module which allows a 'managed_file' upload in the settings/config page. This works fine and displays as expected after uploading (with the filename linked, and a "Remove" submit ...
0
votes
1answer
27 views

Overview & help with drupal files and folders on Win 7

I am a newbie. Please forgive me if this is a dumb question. I'm trying to wrap my brain around what is Drupal and how it works. I installed Acquia Dev Desktop successfully on my Win 7 computer. I ...
0
votes
1answer
30 views

I want to call a mymodule.functions.inc file

Hi all drupalers i am new in drupal coding i wrote a new drupal module that works perfecr but my boss wanted to put all my functions of my .module file in a new folder called 'includes' and in a files ...
0
votes
2answers
31 views

moving a drupal website to another server

I've been working on a drupal website in a server for months but after moving it to another server and url some of the files are not read. for example it seems that it does not read colors.css or all ...
0
votes
0answers
49 views

include Search Files Attachments in custom search view

I have already spent hours on this problem – so I really hope for your help! I have the Search Files module running and indexed my PDF files successfully via the attachments option. The default ...