Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alist-org
GitHub Repository: alist-org/alist
Path: blob/main/drivers/mediafire/meta.go
1987 views
1
package mediafire
2
3
/*
4
Package mediafire
5
Author: Da3zKi7<[email protected]>
6
Date: 2025-09-11
7
8
D@' 3z K!7 - The King Of Cracking
9
*/
10
11
import (
12
"github.com/alist-org/alist/v3/internal/driver"
13
"github.com/alist-org/alist/v3/internal/op"
14
)
15
16
type Addition struct {
17
driver.RootPath
18
//driver.RootID
19
20
SessionToken string `json:"session_token" required:"true" type:"string" help:"Required for MediaFire API"`
21
Cookie string `json:"cookie" required:"true" type:"string" help:"Required for navigation"`
22
23
OrderBy string `json:"order_by" type:"select" options:"name,time,size" default:"name"`
24
OrderDirection string `json:"order_direction" type:"select" options:"asc,desc" default:"asc"`
25
ChunkSize int64 `json:"chunk_size" type:"number" default:"100"`
26
}
27
28
var config = driver.Config{
29
Name: "MediaFire",
30
LocalSort: false,
31
OnlyLocal: false,
32
OnlyProxy: false,
33
NoCache: false,
34
NoUpload: false,
35
NeedMs: false,
36
DefaultRoot: "/",
37
CheckStatus: false,
38
Alert: "",
39
NoOverwriteUpload: true,
40
}
41
42
func init() {
43
op.RegisterDriver(func() driver.Driver {
44
return &Mediafire{
45
appBase: "https://app.mediafire.com",
46
apiBase: "https://www.mediafire.com/api/1.5",
47
hostBase: "https://www.mediafire.com",
48
maxRetries: 3,
49
secChUa: "\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"139\", \"Google Chrome\";v=\"139\"",
50
secChUaPlatform: "Windows",
51
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36",
52
}
53
})
54
}
55
56