Home / Function/ Test_Ctx_SaveFileToStorage_LargeUpload() — fiber Function Reference

Test_Ctx_SaveFileToStorage_LargeUpload() — fiber Function Reference

Architecture documentation for the Test_Ctx_SaveFileToStorage_LargeUpload() function in ctx_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  7e89a5ea_d530_9c31_882a_ddd9ce5c5ca8["Test_Ctx_SaveFileToStorage_LargeUpload()"]
  7b3d4933_5ae3_f84d_ff6d_0cb34e268026["ctx_test.go"]
  7e89a5ea_d530_9c31_882a_ddd9ce5c5ca8 -->|defined in| 7b3d4933_5ae3_f84d_ff6d_0cb34e268026
  92d3970a_b033_4abf_7743_5f07f1c5bc4c["createMultipartFileHeader()"]
  7e89a5ea_d530_9c31_882a_ddd9ce5c5ca8 -->|calls| 92d3970a_b033_4abf_7743_5f07f1c5bc4c
  style 7e89a5ea_d530_9c31_882a_ddd9ce5c5ca8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

ctx_test.go lines 4603–4626

func Test_Ctx_SaveFileToStorage_LargeUpload(t *testing.T) {
	t.Parallel()
	const (
		bodyLimit = 8 * 1024 * 1024
		fileSize  = 5 * 1024 * 1024
	)

	app := New(Config{BodyLimit: bodyLimit})
	storage := memory.New()
	ctx := app.AcquireCtx(&fasthttp.RequestCtx{})

	t.Cleanup(func() {
		app.ReleaseCtx(ctx)
	})

	fileHeader := createMultipartFileHeader(t, "large.bin", bytes.Repeat([]byte{'a'}, fileSize))

	err := ctx.SaveFileToStorage(fileHeader, "test", storage)
	require.NoError(t, err)

	stored, err := storage.Get("test")
	require.NoError(t, err)
	require.Len(t, stored, fileSize)
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does Test_Ctx_SaveFileToStorage_LargeUpload() do?
Test_Ctx_SaveFileToStorage_LargeUpload() is a function in the fiber codebase, defined in ctx_test.go.
Where is Test_Ctx_SaveFileToStorage_LargeUpload() defined?
Test_Ctx_SaveFileToStorage_LargeUpload() is defined in ctx_test.go at line 4603.
What does Test_Ctx_SaveFileToStorage_LargeUpload() call?
Test_Ctx_SaveFileToStorage_LargeUpload() calls 1 function(s): createMultipartFileHeader.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free