Documentation ¶
Index ¶
Constants ¶
View Source
const ( // AccountIDKey is the url key for account id (an account ulid) AccountIDKey = "account_id" // MediaTypeKey is the url key for media type (usually something like attachment or header etc) MediaTypeKey = "media_type" // MediaSizeKey is the url key for the desired media size--original/small/static MediaSizeKey = "media_size" // FileNameKey is the actual filename being sought. Will usually be a UUID then something like .jpeg FileNameKey = "file_name" // FileServePath is the fileserve path minus the 'fileserver' prefix. FileServePath = "/:" + AccountIDKey + "/:" + MediaTypeKey + "/:" + MediaSizeKey + "/:" + FileNameKey )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func New ¶
func New(processor *processing.Processor) *Module
func (*Module) ServeFile ¶
ServeFile is for serving attachments, headers, and avatars to the requester from instance storage.
Note: to mitigate scraping attempts, no information should be given out on a bad request except "404 page not found". Don't give away account ids or media ids or anything like that; callers shouldn't be able to infer anything.
Click to show internal directories.
Click to hide internal directories.