// OpenUploadStreamWithID creates a new upload stream for a file given the file ID and filename.
OpenUploadStreamWithID creates a new upload stream for a file given the file ID and filename.
// OpenUploadStreamWithID creates a new upload stream for a file given the file ID and filename .
func (b *Bucket) OpenUploadStreamWithID(fileID interface{}, filename string, opts ...*options.UploadOptions) (*UploadStream, error) {
	ctx, cancel := deadlineContext(b.writeDeadline)
	if cancel != nil {
		defer cancel()
	}
	if err := b.checkFirstWrite(ctx); err != nil {
		return nil, err
	}
	upload, err := b.parseUploadOptions(opts...)
	if err != nil {
		return nil, err
	}
	return newUploadStream(upload, fileID, filename, b.chunksColl, b.filesColl), nil
}
func ( b * Bucket ) OpenUploadStreamWithID ( fileID interface { } , filename string , opts ... * options . UploadOptions ) ( * UploadStream , error ) { ctx , cancel := deadlineContext ( b . writeDeadline ) if cancel != nil { defer cancel ( ) } if err := b . checkFirstWrite ( ctx ) ; err != nil { return nil , err } upload , err := b . parseUploadOptions ( opts ... ) if err != nil { return nil , err } return newUploadStream ( upload , fileID , filename , b . chunksColl , b . filesColl ) , nil }
OpenUploadStreamWithID creates a new upload stream for a file given the file ID and filename.
OpenUploadStreamWithID creates a new upload stream for a file given the file ID and filename .