pieper opened a new issue #166: get part of an attachment using http range 
requests
URL: https://github.com/apache/couchdb-nano/issues/166
 
 
   <!--- Provide a general summary of the issue in the Title above -->
   Couchdb supports [HTTP Range 
Requests](http://docs.couchdb.org/en/stable/api/document/attachments.html#api-doc-attachment-range)
 but as far as I could see nano does not expose that.
   ## Expected Behavior
   <!--- If you're describing a bug, tell us what should happen -->
   <!--- If you're suggesting a change/improvement, tell us how it should work 
-->
   I would expect that the get/getAsStream opts object would include a range 
member so that resulting stream would only include the specified byte range of 
the attachment.
   
   ## Current Behavior
   <!--- If describing a bug, tell us what happens instead of the expected 
behavior -->
   <!--- If suggesting a change/improvement, explain the difference from 
current behavior -->
   As far as I can tell it's only possible to get the full attachment data.
   
   ## Possible Solution
   <!--- Not obligatory, but suggest a fix/reason for the bug, -->
   <!--- or ideas how to implement the addition or change -->
   As noted in the Couchdb documentation linked above, it should be as simple 
as adding a header like `Range: bytes 0-12` when GETing the attachment.
   
   ## Steps to Reproduce (for bugs)
   <!--- Provide a link to a live example, or an unambiguous set of steps to -->
   <!--- reproduce this bug. Include code to reproduce, if relevant -->
   Don't have a way to reproduce - this is more of a feature question.
   
   ## Context
   <!--- How has this issue affected you? What are you trying to accomplish? -->
   <!--- Providing context helps us come up with a solution that is most useful 
in the real world -->
   We are working on an implementation of the [DICOMweb 
standard](https://www.dicomstandard.org) whereby medical image volumes and 
other data are accessed over a rest api.  [Our 
implementation](https://github.com/dcmjs-org/dicomweb-server) uses fastify and 
couchdb (nano) and it mostly works well.  The metadata is stored in couchdb and 
the image data is in attachments.  However the DICOMweb API supports requesting 
a single frame (slice) out of a full volume and we'd like to be able to access 
that efficiently using a range request to pull just the needed frame 
information from the volume.
   
   ## Your Environment
   <!--- Include as many relevant details about the environment you experienced 
the bug in -->
   * Version used: 7.1.1
   * Link to your project: https://github.com/dcmjs-org/dicomweb-server
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to