Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resumable ¶
type Resumable struct { ChunkNumber int `schema:"resumableChunkNumber" validate:"required"` TotalChunks int `schema:"resumableTotalChunks" validate:"required"` ChunkSize int `schema:"resumableChunkSize" validate:"required"` CurrentChunkSize int `schema:"resumableCurrentChunkSize" validate:"required"` TotalSize int `schema:"resumableTotalSize" validate:"required"` Type string `schema:"resumableType" validate:"required"` Identifier string `schema:"resumableIdentifier" validate:"required"` FileName string `schema:"resumableFilename" validate:"required"` RelativePath string `schema:"resumableRelativePath" validate:"required"` AliasName string `schema:"aliasName" validate:"required"` }
Resumable represents resumable js upload query pararmeters
type Uploader ¶
type Uploader struct {
// contains filtered or unexported fields
}
Uploader represents the necessary configuration for uploading a file
func (*Uploader) CheckUploaded ¶
func (u *Uploader) CheckUploaded(w http.ResponseWriter, req *http.Request)
CheckUploaded godoc @Description checks to see if a chunk has been uploaded @Tags upload @Accept json @Produce json @Param request formData Resumable false "Resumable" @Success 200 @Failure 400 @Failure 404 @Failure 500 @Router /upload [get]
func (*Uploader) GetS3URL ¶
func (u *Uploader) GetS3URL(w http.ResponseWriter, req *http.Request)
GetS3URL godoc @Description returns an S3 URL for a requested path, and the client's region and bucket name @Tags upload @Accept json @Produce json @Param id path string true "S3 object key" @Success 200 @Failure 400 @Failure 404 @Failure 500 @Router /upload/{id} [get]
func (*Uploader) Upload ¶
func (u *Uploader) Upload(w http.ResponseWriter, req *http.Request)
Upload godoc @Description handles the uploading of a file to AWS s3 @Tags upload @Accept json @Produce json @Param request formData Resumable false "Resumable" @Success 200 @Failure 400 @Failure 404 @Failure 500 @Router /upload [post]