put

package
v4.0.0-alpha2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2022 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithPutInterceptor

func WithPutInterceptor() nodes.Option

func WithUploadLimiter

func WithUploadLimiter() nodes.Option

Types

type Handler

type Handler struct {
	abstract.Handler
}

Handler handles Put requests by creating temporary files in the index before forwarding data to the object service. This temporary entry is updated later on by the sync service, once the object is written. It is deleted if the Put operation fails.

func (*Handler) Adapt

func (m *Handler) Adapt(c nodes.Handler, options nodes.RouterOptions) nodes.Handler

func (*Handler) CreateNode

CreateNode recursively creates parents if they do not already exist Only applicable to COLLECTION inside a structured storage (need to create .pydio hidden files)

func (*Handler) MultipartAbort

func (m *Handler) MultipartAbort(ctx context.Context, target *tree.Node, uploadID string, requestData *models.MultipartRequestData) error

func (*Handler) MultipartCreate

func (m *Handler) MultipartCreate(ctx context.Context, node *tree.Node, requestData *models.MultipartRequestData) (string, error)

MultipartCreate registers a node in the virtual fs with size 0 and ETag: temporary (we do not have the real size at this point because we are using streams.)

func (*Handler) PutObject

func (m *Handler) PutObject(ctx context.Context, node *tree.Node, reader io.Reader, requestData *models.PutRequestData) (int64, error)

type UploadLimitFilter

type UploadLimitFilter struct {
	abstract.Handler
}

UploadLimitFilter restricts atomic uploads by extension and maximum size, based on the front plugins configuration.

func (*UploadLimitFilter) Adapt

func (*UploadLimitFilter) MultipartPutObjectPart

func (a *UploadLimitFilter) MultipartPutObjectPart(ctx context.Context, target *tree.Node, uploadID string, partNumberMarker int, reader io.Reader, requestData *models.PutRequestData) (models.MultipartObjectPart, error)

MultipartPutObjectPart checks Upload Limits (size, extension) defined in the frontend on MultipartPutObjectPart

func (*UploadLimitFilter) PutObject

func (a *UploadLimitFilter) PutObject(ctx context.Context, node *tree.Node, reader io.Reader, requestData *models.PutRequestData) (int64, error)

PutObject checks Upload Limits (size, extension) defined in the frontend on PutObject operation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL