(runtime *common.RuntimeContext, spec markdownUploadSpec, fileSize int64)
| 396 | } |
| 397 | |
| 398 | func uploadMarkdownLocalFile(runtime *common.RuntimeContext, spec markdownUploadSpec, fileSize int64) (markdownUploadResult, error) { |
| 399 | fileName := finalMarkdownFileName(spec) |
| 400 | if fileSize > markdownSinglePartSizeLimit { |
| 401 | return uploadMarkdownFileMultipart(runtime, spec, fileName, fileSize, func() (io.ReadCloser, error) { |
| 402 | return runtime.FileIO().Open(spec.FilePath) |
| 403 | }) |
| 404 | } |
| 405 | return uploadMarkdownFileAll(runtime, spec, fileName, fileSize, func() (io.ReadCloser, error) { |
| 406 | return runtime.FileIO().Open(spec.FilePath) |
| 407 | }) |
| 408 | } |
| 409 | |
| 410 | func uploadMarkdownFileAll(runtime *common.RuntimeContext, spec markdownUploadSpec, fileName string, fileSize int64, openReader func() (io.ReadCloser, error)) (markdownUploadResult, error) { |
| 411 | target := spec.Target() |
no test coverage detected