Hi!

First I must say thank you so much for doing this module. I was about to look into making this exact thing for myself, and I have nearly zero module building ability.

It seems to work perfectly well for me.

My only request would be to find a way to mask the URL of the actual files and only display the URL of the File Node when the file is displayed. Do you know if this is possible at all?

Thanks.

Comments

yookoala’s picture

Thanks for your comment.
I'm actually working on this "mask" thing.

Please stay tune on this module.
You'll likely be getting it on the next version. :)

yookoala’s picture

Status: Active » Needs review

Since I happen to have time these days, I created a new release that provided the feature you want.
Please check these out.

tommyk’s picture

This is great! I really like that the file URL is not shown.

The next part that I would ask about is if it is possible for the URL path settings to be followed for nodes. I changed the path from /node/62 to /somefile. When an anonymous user goes to the new path, the URL that gets displayed is /node/62/file.

I completely understand why, I'm just hoping that the file can be shown with a custom path also.

What do you think?

Again, thanks for all your work on this, it is extremely helpful and a great feature for Drupal!

yookoala’s picture

Quick solution for you

If you enabled the path module, you'll get a URL path settings field in your node form to set a masked path for "node/[nid]". So you can make "node/[nid]" to look like "somefile". However, the actual URL of the file is "node/[nid]/file". So masking "node/[nid]" as "somefile" will not do the thing you wanted to do. Instead, you need to mask "node/[nid]/file" as "somefile". To do this, you'll need to go to Administer › Site building › URL aliases › Add alias (http://yourdruaplsite.com/admin/build/path/add) and add a new alias:

  • Existing system path: "node/[nid]/file"
  • Path alias: "somefile"

This way, the path to your file will looks like "somefile".

Concern before adding a simple file path URL field

Of course, this is not easy. I have some concern over the use of alias.

Alias (URL path settings) is good for visitors. So this feature is quite a good idea. However, if your site have 1000+ alias, they would be hard to manage. Especially when you want to mask both "node/[nid]" and "node/[nid]/file", you'll end up making 2 alias for each filenode. Imagine if you create a node "node/62", that means you'll create 2 paths: "node/62" and "node/62/file". Then you may create 2 path URL for them: "somefile" and "somefile.doc".

I could have add a "File Path URL" field to make this easier, but I fear that would encourage users to create too much alias that may crashes with one another. Or am I thinking too much?

tommyk’s picture

Thanks for the explanation of the Add Alias. I think this is all that I would need. I don't have that many files to manage. I probably would only use aliases for the file paths anyway, because they will only be for users who cannot edit.

I do understand the caution for too many aliases to manage. I wouldn't want you to make this great module too complex.

Thanks again for all the excellent work.

yookoala’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for your comment.
And thanks for using.

I'm think ways to add it better to the module.
Hope I'd get something useful in the future.

:)

yookoala’s picture

Status: Reviewed & tested by the community » Closed (fixed)

(Feature created)

yookoala’s picture

Status: Closed (fixed) » Fixed

(Feature created)

(I'm confused by the "Status" here. Just figured out that this one should be "Fixed".)

tommyk’s picture

Version: 6.x-1.2 » 6.x-1.4
Status: Fixed » Active

Everything was working great using 6.x-1.3 but the URL of the file gets displayed using 6.x-1.4 instead of the path alias.

yookoala’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Drupal 6 is outdated and hence will not work on this anymore.