Nextjournal BlogJun 11 2019 UTC

Preserving Filenames for Uploads & Results

Working with uploads & results has just gotten easier. Previously, when referencing an uploaded file or result, Nextjournal’s data versioning system would discard the file extension. This was problematic for tools that expect a file to carry a certain extension. This is no longer the case:

artist_data.csv
ls 
artist_data.csv
| xargs -n 1 basename

The same is true for results:

echo "my result" > /results/hello.txt
empty
ls 
hello.txt
| xargs -n 1 basename

This is all done while preserving the automatic data versioning capabilities that Nextjournal provides.

When working with files that expect a number of files in a certain directory, it's still recommended to create a directory and link the files into it:

mkdir -p /my-data
ln -sf 
hello.txt
/my-data/ ln -sf
hello.txt
/my-data/

Then this directory can be read normally:

ls /my-data

Lastly, we've also changed the mount path for the versioned file system from /data to /.nextjournal to avoid collisions when you're working with imported docker images.

We hope these changes remove some of the friction you've previously encountered.