WriteFileFromReader creates and uploads a "file" JSON schema composed of chunks of r, also uploading the chunks. The returned BlobRef is of the JSON file schema blob. The filename is optional.
(ctx context.Context, bs blobserver.StatReceiver, filename string, r io.Reader)
| 83 | // BlobRef is of the JSON file schema blob. |
| 84 | // The filename is optional. |
| 85 | func WriteFileFromReader(ctx context.Context, bs blobserver.StatReceiver, filename string, r io.Reader) (blob.Ref, error) { |
| 86 | return WriteFileFromReaderWithModTime(ctx, bs, filename, time.Time{}, r) |
| 87 | } |
| 88 | |
| 89 | // WriteFileMap uploads chunks of r to bs while populating file and |
| 90 | // finally uploading file's Blob. The returned blobref is of file's |