Hi,

I'm not sure if this is within the scope of this module, but I wondering if it would be possible to extend the Pathauto module so it can handle file uploads as well.

I know there already is a uploadpath module, but it's still not as advanced as pathauto. Also there is some overlapping functionality in the two modules.

What do you think?

Comments

greggles’s picture

Status: Active » Postponed (maintainer needs more info)

What do you mean by "handle file uploads" ?

thulstrup’s picture

Sorry, I'll try to elaborate a bit.

At the moment all files uploaded using the core upload module are placed in the root of the files/directory.

I would like to be able to specify exactly how files are stored, using a similar interface as Pathauto.
For examples I could specify that all files attached to a story node should be placed in a directory called "files/stories/the-name-of-the-name/"

Also there the problem with special characters and spaces in filename. A filename like "here is my file, it's great.doc" would cause problems in some browsers.
I would like it changed to something like "here-is-my-file-its-great.doc".

So instead of: files/here is my file, it's great.doc
We get: files/stories/the-name-of-the-name/here-is-my-file-its-great.doc

I hope that cleared things up a bit.
As I stated earlier I'm not sure if this should be part of pathauto or a completly seperate module. It just seems to me that a lot of the functionality need, already exists in pathauto.

greggles’s picture

Title: Handle file upload paths » alter file upload paths/names
Project: Pathauto » Upload path
Version: 6.x-1.x-dev » 5.x-1.x-dev

That should be part of upload path, I don't see that as something that Pathauto should do.

If Pathauto can help it would be in generalizing the whole "cleanstring" concept into an API as a separate module that other modules can use.

I'm re-assigning this to upload path so I can keep track of the issue within the scope of that module.

thulstrup’s picture

Thanks.

A general cleanstring API would be a good thing.

I think other modules besides upload path (like comment_upload and filefield) could also benefit from it.

davidwhthomas’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)