Skip to content

Commit d1d6f63

Browse files
authored
Merge pull request #450 from Da3zKi7/feat/mediafire
feat(drivers): add MediaFire driver support
2 parents ab1cd40 + 5127c37 commit d1d6f63

File tree

6 files changed

+147
-0
lines changed

6 files changed

+147
-0
lines changed
106 KB
Loading
Lines changed: 33 additions & 0 deletions
Loading
128 KB
Loading
65.8 KB
Loading

docs/guide/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ A file list program that supports multiple storage, and supports web browsing an
4040
- [x] [UPYUN Storage Service](https://www.upyun.com/products/file-storage)
4141
- [x] WebDAV
4242
- [x] Teambition([China](https://www.teambition.com/)[International](https://us.teambition.com/)
43+
- [x] [MediaFire](../guide/drivers/mediafire.md)
4344
- [x] [mediatrack](https://www.mediatrack.cn/)
4445
- [x] [189cloud](https://cloud.189.cn) (Personal, Family)
4546
- [x] [139yun](https://yun.139.com/) (Personal, Family)

docs/guide/drivers/mediafire.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
author: Da3zKi7 (D@' 3z K!7)
3+
# This is the icon of the page
4+
icon: iconfont icon-state
5+
# This control sidebar order
6+
order: 185
7+
# A page can have multiple categories
8+
category:
9+
- Guide
10+
# A page can have multiple tags
11+
tag:
12+
- Storage
13+
- Guide
14+
- "302"
15+
# this page is sticky in article list
16+
sticky: true
17+
# this page will appear in starred articles
18+
star: true
19+
---
20+
21+
# MediaFire
22+
23+
<br/>
24+
25+
![logo](/img/drivers/mediafire/mediafire_mf_logo_u1_full_color_reversed.svg)
26+
27+
Site:**https://mediafire.com**
28+
<br/>
29+
30+
- MediaFire does not provide `API_KEY` nor `APP` support anymore, so setting user session values is a must.
31+
- :warning: Alist version > ==3.53.0== to get this driver.
32+
33+
## **Configure storage**
34+
35+
1. Go **http://localhost:5244/@manage/storages** or your custom AList web
36+
2. Press "Add" button to bind another storage
37+
3. Choose "MediaFire"
38+
4. Set Mount Path, i.e. /MediaFire/MyCloud
39+
5. Go **https://mediafire.com** in another browser tab
40+
6. Open Dev Tools by pressing F12 or (Ctrl / Command) + Shift + I
41+
7. Press "Network" tab (upper bar)
42+
8. Press F5 to refresh and start intercepting all requests
43+
44+
9. Copy the `Session Token`
45+
46+
![session_token](/img/drivers/mediafire/mediafire_session_token.png)
47+
48+
10. Switch tab to AList Admin and Paste it into Session Token field
49+
50+
11. Switch tab to MediaFire and Copy the `Cookie`
51+
52+
![cookie](/img/drivers/mediafire/mediafire_cookie.png)
53+
54+
12. Switch back tab to AList Admin and Paste it into Cookie field
55+
56+
13. Verify Session Token and Cookie are set
57+
58+
![session_token_cookie](/img/drivers/mediafire/mediafire_session_token_cookie.png)
59+
60+
<br/>
61+
62+
14. Press "Add" button again to confirm your MediaFire storage. Done!
63+
64+
<br/>
65+
66+
## **Root folder ID**
67+
68+
Default is "/", because this driver roots to "myfiles", and then manages directories to folderID like "xxxyyyzzz123".
69+
70+
- Custom folder root is currently not supported since MediaFire dir structure is based in IDs, not in sequential navigation i.e. /myfiles/Photos/Christmas/
71+
72+
<br/>
73+
74+
### **Features**
75+
76+
1. List, Link, MakeDir, Move, Rename, Copy, Remove, Put, PutResult
77+
78+
2. Session auto-refreshing
79+
80+
3. Upload is resumable and supports recovery, due to splitted in chunks transmission. Very useful for big files.
81+
82+
<br/>
83+
84+
### **Tips**
85+
86+
1. `root folder ID`,`root folder Path` will be set automatically
87+
88+
2. MediaFire closes the current session after 10 mins, an auto renewal of session (as stated before) is already implemented, however if you shut down AList or your PC, session will expire and reconfiguring session and cookie is mandatory, in order to keep the storage working!
89+
90+
3. If you have AList running in a server or smartphone, you will likely do not have problems about the uggly session expiry, unless AList server get off.
91+
92+
<br/>
93+
94+
### **The default download method used**
95+
96+
```mermaid
97+
---
98+
title: Which download method is used by default?
99+
---
100+
flowchart TB
101+
style a1 fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff
102+
style a2 fill:#ff7575,stroke:#333,stroke-width:4px
103+
subgraph ide1 [ ]
104+
a1
105+
end
106+
a1[302]:::someclass====|default|a2[user equipment]
107+
classDef someclass fill:#f96
108+
c1[local proxy]-.alternative.->a2[user equipment]
109+
b1[Download proxy URL]-.alternative.->a2[user equipment]
110+
click a1 "../drivers/common.html#webdav-policy"
111+
click b1 "../drivers/common.html#webdav-policy"
112+
click c1 "../drivers/common.html#webdav-policy"
113+
```

0 commit comments

Comments
 (0)