Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add file mode to body processors #76

Closed
Tracked by #98
jptosso opened this issue Aug 12, 2021 · 1 comment
Closed
Tracked by #98

Add file mode to body processors #76

jptosso opened this issue Aug 12, 2021 · 1 comment
Labels
enhancement New feature or request v2

Comments

@jptosso
Copy link
Member

jptosso commented Aug 12, 2021

There are two ways it can be done, we could change

Read(reader io.Reader, mime string, storagePath string) error
// To
Read(reader io.Reader, mime string, storagePath string, fileMode fs.FileMode) error

Or we could create a new way to send parameters to the Read function, like

Read(options types.BodyBufferOptions) error

It must be solved before relasing v2

@jptosso jptosso added the v2 label Sep 20, 2021
@jptosso jptosso changed the title Implement custom multipart parser Add file mode to body processors Dec 7, 2021
@jptosso jptosso added the enhancement New feature or request label Dec 7, 2021
@jptosso jptosso mentioned this issue Dec 7, 2021
18 tasks
@jptosso
Copy link
Member Author

jptosso commented Dec 10, 2021

Implemented in #123, new type bodyprocessors.Options

// Options are used to inform a body processor where and how
// to store the data
type Options struct {
	// Mime is the type of the body, it may contain parameters
	// like charset, boundary, etc.
	Mime string
	// StoragePath is the path where the body will be stored
	StoragePath string
	// FileMode is the mode of the file that will be created
	FileMode fs.FileMode
}

@jptosso jptosso closed this as completed Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v2
Projects
None yet
Development

No branches or pull requests

1 participant