I'm using current alpha 1 of plup and the Transliterate module. But files uploaded via plup are not transliterated. Is this a known problem?

CommentFileSizeAuthor
#5 plup-transliteration-1692850-5.patch985 bytesAdamGerthel
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sashken2’s picture

I have this problem too.

derMatze’s picture

Any solution for this issue?

sludwig’s picture

You could add translation functionality in function plup_field_attach_presave in file plup.module

Replace this:

$fileName = isset($item['rename']) ? $item['rename'] : $file->filename;

with this:

          if (isset($item['rename'])) {
            if (module_exists('transliteration')) {
              $fileName = transliteration_clean_filename($item['rename']);
            } else {
              $fileName = $item['rename'];
            }
          } else {
            $fileName = $file->filename;
          }

With this all new uploaded files are transliterated when the node is saved, if the Transliteration Module is available.

sashken2’s picture

sludwig, thanks! All works good!
ivanjaros, can you add it in dev version?

AdamGerthel’s picture

Here's a patch based off of the code in #3