gridfs-file-upload project contains two API's
- Upload API is POST API which upload the file in mongodb with GridFS.
- Download API is also post api user pass file name and id and download the file from data base.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
A grid file system is a computer file system whose goal is improved reliability and availability by taking advantage of many smaller file storage areas. In MongoDB, use GridFS for storing files larger than 16 MB.
#####GridFS stores files in two collections:
chunks stores the binary chunks. For details, see The chunks Collection.
files stores the file’s metadata. For details, see The files Collection.
GridFS places the collections in a common bucket by prefixing each with the bucket name. By default, GridFS uses two collections with a bucket named fs:
fs.files
fs.chunks
Code Assignment project is Go language based.
Install Go with homebrew:
sudo brew install go
with apt-get:
sudo apt-get install golang
install Golang manually or compile it yourself
Install packages from github to my gopath/
go get -u github.com/gorilla/mux
TODO: Write usage instructions
- Fork it!
- Create your feature branch:
git checkout -b code-assignment
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin code-assignment
- Submit a pull request.
The test directory contains tests of the Go tool chain and runtime. It includes black box tests, regression tests, and error output tests.
To run just these tests, execute:
$ go test -run NameOfTest
$ go test -run Test_TriangleType
Some Commands for test files -
go test -run '' # Run all tests.
go test -run Foo # Run top-level tests matching "Foo", such as "TestFooBar".
go test -run Foo/A= # For top-level tests matching "Foo", run subtests matching "A=".
go test -run /A=1 # For all top-level tests, run subtests matching "A=1".
Standard library tests should be written as regular Go tests in the appropriate package.
The tool chain and runtime also have regular Go tests in their packages. The main reasons to add a new test to this directory are:
- it is most naturally expressed using the test runner; or
- it is also applicable to
gccgo
and other Go tool chains.