Hello, for some of my projects I need to setup different folders for uploading files. Upload path module seems to be user friendly and doing what I need. However I need this to be compatible with Drupal 6.

It seems that development of this module is on hold. I could spare 100 USD for D6 version. So let me know if anyone interesting in development of this module and could create it for our community. After the work is done and the module is available here on Drupal.org, I will pay the money.

Comments

pobster’s picture

maxiorel’s picture

Thanks. Installation and settings is working, but the files are still uploaded directly to the /files. I used the settings [type]/[yyyy]/[mm]. Any changes to working state are welcome.

Jan Polzer, Drupal & Symfony developer

pobster’s picture

Afraid I just straight converted it, didn't bother to check it worked okay - don't even really know what it does! ;o)

I'll take a look at it, no worries - could do with the cash!

Pobster

pobster’s picture

Ah okay it actually does work fine but there's a condition which has a comment;

// if (0 === strpos($key, 'upload_')) { // Only rewrite the name when adding the file, not when updating it

When you comment out that condition the filename is rewritten correctly... So I guess I'll have to find another way to check if the file is being added rather than updated. I'll be right back, just having some dinner.

Pobster

pobster’s picture

Bugger, so it seems that the upload module works completely differently in D6.x and although I can get the uploadpath module to only act on newly added files by changing that line to;

if (array_key_exists($key, $_SESSION['upload_files'])) { // Only rewrite the name when adding the file, not when updating it

It *does* change the filename correctly, but it seems that's not enough any more... I'll look into it when I get a minute.

Pobster

maxiorel’s picture

Thanks, I will be waiting together with my money :-)

Jan Polzer, Drupal & Symfony developer

maxiorel’s picture

any new progress, please?

Jan Polzer, Drupal & Symfony developer

pobster’s picture

Sorry haven't looked at it at all today, got up at 4am to start work and didn't stop until 9pm... Haven't done much Drupalling today...

Pobster

sonnen’s picture

I posted a new patch to update the 5.x-1.x-dev code to be 6x compatible:

http://drupal.org/node/237613

or directly at:

http://drupal.org/files/issues/uploadpath_5x_to_6x.patch

It addresses the file upload API changes, and the hook_nodeapi problem that prevented some tokens from working. (http://drupal.org/node/191571)

Thanks,
Richard

pobster’s picture

Ah awesome, glad someone looked into it - I just haven't had the time this week.

Thanks,

Pobster

maxiorel’s picture

Thanks, will try it after I learn how to apply patch in Windows.

Jan Polzer, Drupal & Symfony developer

maxiorel’s picture

So I think that Sonnen should contact me about the money. This patch is really working.

Jan Polzer, Drupal & Symfony developer