It would be convenient to have the temporary directory configurable, even if we don't provide a UI for changing it (you can change it in settings.php or similar).

I realise that the temporary:// directory location provided is a sensible default for most use cases, but there are situations where you really would not want the file there, accepted they might be edge cases, but having this configurable is fairly harmless.

One example: if you run a system with multiple web nodes, and they each have their own temp storage at /tmp for performance reasons, but they also share common files on a slower file system (eg NFS, gluster etc), then when using batched export, you can end up with the situation where parts of the temporary file get built up on different web nodes with each AJAX call, and the final file returned is some random incomplete file. In that situation, I'd want to be able to configure the temp file location to somewhere on the common storage.

I can imagine that other users may have reasons for wanting to store this file in any location on any available stream wrapper scheme (though the sensible default obviously is temporary://)

Initial patch attached for discussion.

CommentFileSizeAuthor
views_data_export_dir_conf.patch698 bytesAlan Evans
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Steven Jones’s picture

Status: Needs review » Fixed

Thanks so much for the patch, seems like a decent idea, and doesn't need a UI, people who need it can set it via other means. Committed to 7.x-3.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

chousmith’s picture

+1 for this fix working, in the the latest 7.x-3.x-dev builds. Was having an issue with Batch processing exports failing on Acquia hosting on the live environment with a load balancer between 2 separate live servers. Both servers share the same "public" files directory, so once I added the line to set the views_data_export_directory to the settings.php file, it worked like a charm. Thanks!

$conf['views_data_export_directory'] = 'public://';

gargsuchi’s picture

We can also set this variable using drush.
drush vset views_data_export_directory 'public://'

works fine for me. Thanks for adding in this fix.