Skip to content

Middleware that make DICOM params package compatible with rails.

License

Notifications You must be signed in to change notification settings

sanzstez/dicom-package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rack multipart/related DICOM middleware

DicomPackage::Middleware it's a rack middleware to parse multipart/related requests with DICOM data and rebuild it to Rails compatible params.

What does it do?

Using this middleware, params is parsed and rebuilt like the code below:

{"files"=>{"<[email protected]>"=>#<ActionDispatch::Http::UploadedFile:0x0000000109bd2ab8 @tempfile=#<Tempfile:/var/folders/4d/k113_9r544nfj8k0bfxtjx0m0000gn/T/1.dcm20220411-56599-34wg47>, @original_filename="1.dcm", @content_type="application/dicom", @headers=nil>, "<[email protected]>"=>#<ActionDispatch::Http::UploadedFile:0x0000000109bd20e0 @tempfile=#<Tempfile:/var/folders/4d/k113_9r544nfj8k0bfxtjx0m0000gn/T/2.dcm20220411-56599-aa96ex>, @original_filename="2.dcm", @content_type="application/dicom", @headers=nil>, "<[email protected]>"=>#<ActionDispatch::Http::UploadedFile:0x0000000109bd2018 @tempfile=#<Tempfile:/var/folders/4d/k113_9r544nfj8k0bfxtjx0m0000gn/T/3.dcm20220411-56599-89pzin>, @original_filename="3.dcm", @content_type="application/dicom", @headers=nil>}}

Usage

In your Gemfile:

gem 'dicom-package'

In your environment.rb:

config.middleware.use DicomPackage::Middleware

About

Middleware that make DICOM params package compatible with rails.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages