Ok, ok. Yes, I did a search! But with 320,890 results it was not too helpful.

I have a folder of math standards in .docx format that I've uploaded to the site. It's in the directory as: sites/default/files/curriculum/math/standards and I've been trying like heck to get this to show up in Views. I need a list of files that users can click to download and Views seems the best/only way to get a specific list of files to display.

I created a new View, named it MathStandards, and used the Filter Criteria-- File:Path. I then entered the same path as above. Still won't display the files.

What am I doing wrong?

Here's hoping someone will help out! Thanks!

-carrie

Comments

rj’s picture

You will need to create a content type and add a cck filefield to upload files so that views can be aware of the files.

--rj

carriesn’s picture

I have done that. This feature only allows me to upload ONE file. I can't have multiple files showing, only the one that I uploaded.

?

rj’s picture

You should be able to restrict the number of files loaded per node, and also restrict the number of files shown from the view, depending on what you're trying to accomplish.

--rj

VanD’s picture

With drupal 7 you should be able to upload multiple files to single nodes, but just one at a time.
To upload multiple files in a single go, there is a brand new module to do that. However, I do not recommend you install this on a production site until you fully test it.
http://drupal.org/sandbox/czigor/1115362

- Craig Vanderlinden @cvanderlinden

s0s’s picture

Thanks for all your inputs but it doesn't resolve the problem: how to specify the File: path in order to filter correctly?

I need neither a content type nor a cck field to have it display in views: uploading through IMCE will do (still one by one, though) but I can't get the argument File: Path to filter correctly. As long as there is no filter installed it shows all files:

Mime type: image/png
Path: sites/default/files/user/4/bla.png
bla.png
...

But whatever path I specify they all disappear :/

I'm trying to make blocks showing files of a department on all department pages (can't do it with an attachments block as this will only show the files of one node and, thus, different content on every page, except if we were to attach all files to all nodes belonging to one department which is obviously not feasible).

Any ideas? Is path referring to URL?

Thanks in advance for helping to save my laptop: I'm going crazy!

EDIT: File: Path is not just the path to the file but path including filename... is it possible just to get 'path only' so it would allow to show all files within a folder?

s0s’s picture

Hi Carriesn,

The problem was using the wrong operator. Choose 'contains' or 'starts with' and it will work.

Cheers, m

keoni21230’s picture

I have a similar, but not identical, problem. When I post a node (a content type I call "event") directly to the front page, the file that I include with the node when I create it, shows up just like I want it. However, when I post the content to a view in order to take advantage of sorting by ascending date, the file will not appear. When I add field: file to the filter list for the view, I get nothing at all.

So, i need to be able to get the view that I create to display the date field and the attached file OR get the front page to allow me to sort by ascending dates. Every time i think it's just a matter of adding to the filters or the sort criteria, I get no content at all.

Can you help?

Keoni

ossan’s picture

You can try my method I describe in this forum.

ossan’s picture

I know this is too late, but for future reference. This is drupal 7.

When you create views, do not choose 'file' from the show box. Instead, choose 'content'. Instead of teaser, choose field. Then you add field 'content: file'. This itself will display the uploaded file from the whatever directory you put it in. Then you can still play around with other field to display.

Note: You must first upload the file using a node created by a content type. Add 'file' as the field type.