I'd like to choose the directory where the track files are saved, and to do that I can use the filefield module, but using that module it seems that trackfield is not able to find the track file anymore.
Is there a way to change the directory where trackfield gets the file?

Comments

Giuseppe’s picture

Priority: Normal » Minor

I solved the problem changing in trackfield_file.module

  /* Find the file */
  foreach ($node->files as $file) {
    if ($file['filename'] == $item['value']) {
      $filepath = $file['filepath'];
    }
  }

with

  /* Find the file */
  foreach ($node->field_filetrk as $file) {
    if ($file['filename'] == $item['value']) {
      $filepath = $file['filepath'];
    }
  }

where field_filetrk is the name of the field containing the file uploaded through filefield.
I don't know if it's the easiest solution, but maybe it can be useful.

raintonr’s picture

Ah. Well, this was really meant to work with the core attachments. Don't suppose you have code with a switch or something that detects if filefield is in use?

Think with this there should be an option on the trackdata widget that tells it whether to look in the standard attachment or in a specific filefield. Of course any such option should only be shown when filefield is installed and active.

honigferd’s picture

That would be quite helpful indeed.

raintonr’s picture

Category: support » feature

Changing this to a feature request. Am very busy though, not sure when a chance to look at this will come.

polskikrol’s picture

Subscribing. Would be useful to support CCK FileField and remove the dependency on Upload Module. CCK FileField provides many more options. (I am a user who doesnt use the Core upload module due to lacking features. Not sure if drupal provides the ability for an OR clause to satisfy dependencies, ie, either need to have Upload module enabled or FileField module enabled.)

Does this module currently support the ability to upload multiple files on a single node and display multiple tracklogs/elevation profiles?