This CKAN extension provides a javascript enhanced file upload widget for improved UI/X when uploading files to create or update resources.
CKAN version | Compatible? |
---|---|
v1.0.1 and earlier | not tested |
v1.0.2 | v1.0.0 |
CKAN version | Compatible? |
---|---|
2.8 and earlier | not tested |
2.9 | <= v1.0.0 |
2.10 | not tested |
2.11 | not tested |
To install ckanext-file-uploader:
-
Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
-
Clone the source and install it on the virtualenv
git clone https://github.com/fjelltopp/ckanext-file-uploader.git cd ckanext-file-uploader pip install -e . pip install -r requirements.txt
-
Install the javascript dependencies (you may need to install
nvm
first)cd react nvm use npm clean-install npm run build
-
Add
file_uploader
to theckan.plugins
setting in your CKAN config file (by default the config file is located at/etc/ckan/default/ckan.ini
). If you are usingckanext-fjelltopp-theme
make sure that this extension is rightwards in the list of extensions. -
Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:
sudo service apache2 reload
None at present
To install ckanext-file-uploader for development, activate your CKAN virtualenv and do:
git clone https://github.com/fjelltopp/ckanext-file-uploader.git
cd ckanext-file-uploader
python setup.py develop
pip install -r dev-requirements.txt
cd react
nvm use
npm install --include=dev
npm run dev
To run the python tests, do:
pytest --ckan-ini=test.ini
And for the javascript tests:
cd react
npm run test