Skip to content

Commit

Permalink
address review
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Mar 5, 2024
1 parent 6a87bd0 commit 599e5cf
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions source/gridfs/gridfs-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -502,14 +502,16 @@ After storing all chunk documents generated for the user file in the "chunks" co
collection document for the file and store it in the files collection. The fields in the files collection document are
set as follows:

| Name | Description | | length | the length of this stored file, in bytes. | | chunksize | the chunk size in bytes used
to break the user file into chunks. While the configuration option is named "chunkSizeBytes" for clarity, for legacy
reasons, the files collection document uses only "chunkSize". | | uploaddate | a BSON datetime object for the current
time, in UTC, when the files collection document was created. | | md5 | MD5 checksum for this user file, computed from
the file"s data, stored as a hex string, if computed, otherwise omitted. | | filename | the filename passed to this
function, UTF-8 encoded. | | contenttype | the "contentType" passed in the options, if provided; otherwise omitted. | |
aliases | the array passed in the options, if provided; otherwise omitted. | | metadata | the "metadata" document passed
in the options, if provided; otherwise omitted. |
| Name | Description |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| length | the length of this stored file, in bytes. |
| chunksize | the chunk size in bytes used to break the user file into chunks. While the configuration option is named "chunkSizeBytes" for clarity, for legacy reasons, the files collection document uses only "chunkSize". |
| uploaddate | a BSON datetime object for the current time, in UTC, when the files collection document was created. |
| md5 | MD5 checksum for this user file, computed from the file's data, stored as a hex string, if computed, otherwise omitted. |
| filename | the filename passed to this function, UTF-8 encoded. |
| contenttype | the "contentType" passed in the options, if provided; otherwise omitted. |
| aliases | the array passed in the options, if provided; otherwise omitted. |
| metadata | the "metadata" document passed in the options, if provided; otherwise omitted. |

If a user file contains no data, drivers MUST still create a files collection document for it with length set to zero.
Drivers MUST NOT create any empty chunks for this file.
Expand Down

0 comments on commit 599e5cf

Please sign in to comment.