Thanks for a great module. It's a must have for big sites. I've millions of files under the files directory; that slows down everything.

Can you please consider adding support for the Comment Upload module (http://drupal.org/project/comment_upload).

Thanks,
introfini

CommentFileSizeAuthor
#6 filefield_paths.zip18.84 KBdeciphered
#3 filefield_paths.zip18.82 KBdeciphered

Comments

deciphered’s picture

Hi introfini,

Amazing timing for this request, I had only just considered doing this myself a few days ago.
Have started work on it and should be available in a dev build in the next few days with any luck.

Cheers,
Deciphered.

introfini’s picture

Great news!

introfini

deciphered’s picture

StatusFileSize
new18.82 KB

Attached is a zip containing a partially tested development build of FileField Paths with support for the Comment Upload module.

Apologies for the use of a zip, but my dev environment is a little messed up at the minute and I couldn't apply my own patches. Will likely upload a patch sometime in the future.

Any testing you can do would be greatly appreciated.

Cheers,
Deciphered.

introfini’s picture

I'm on it :-)

introfini’s picture

I'm getting this error:

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of call_user_func(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in C:\wamp\www\onc\sites\all\modules\filefield_paths\filefield_paths.module on line 477

I will continue testing the module.

introfini

deciphered’s picture

StatusFileSize
new18.84 KB

Hey,

Thanks for the testing, it really helps.
Attached is a new zipped version that fixes the issue you had, or at least it should.

One thing to note, retroactive updates have not been implemented for the Comment Upload module yet.

Cheers,
Deciphered.

introfini’s picture

It works now, but with a strange issue. If I choose the file without clicking the attach button but instead submit the comment form directly the file is attached and the path correctly changed. The other way the file isn't attached.

I'm using comment upload alpha 2, there is a bug in the higher versions that prevents more than one file to get uploaded...

Thanks.
introfini

deciphered’s picture

Hi,

When you say that when you hit the attach button the filepath is incorrect, are you talking about before you actually submit the node? Because if that is the case then that is the expected behaviour.

FileField Paths uploads the file to a temporary directory (in this case the files path) and then once the node (or comment) is saved it relocates the file.
This is due to the fact that the tokens can not be processed as the node tokens are not populated until the node has been created. Technically the Comment Upload integration doesn't need to work this way as the node tokens are populated, but it's the only way it can really work inside the FileField Paths module.

As for the alleged issue with Comment Upload not being able to handle multiple files, I'm using the latest development build, which is presumably the same as Alpha-4, and it handles multiple files without any issues.

Cheers,
Deciphered.

deciphered’s picture

Status: Active » Patch (to be ported)

Committed to DRUPAL-6--1 - http://drupal.org/cvs?commit=214958.

To be backported to DRUPAL-5.

Cheers,
Deciphered.

deciphered’s picture

Status: Patch (to be ported) » Closed (fixed)

Backported to DRUPAL-5.