This is the GET service which is part of the Conclave Document Upload Services
- Client: used for basic token authentication. For each application that can post to this service, a Client object needs to be created
- Document: used to store the state of the file and to retrieve the file once threat scanning succeeds
This is a Ruby on Rails application that takes a document_id and retrieves the Document and the attached document_file. It's only presented as an internal API and doesn't face public users.
xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew install rbenv
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
rbenv install 3.3.3
rbenv global 3.3.3
gem install rails -v X.X.X
Go to https://www.postgresql.org/ and download the installer
rake db:create && rake db:migrate
From your console run the rails server:
rails s
You can now use the service by sending a GET request to: localhost:3000/document/:id
To run the specs, from your console do:
rspec spec