File upload sequence diagram
The server hands out an upload address, the browser uploads straight to storage, then reports completion: why big files bypass the app server.
The diagram
Reading it step by step
- 1. 'User' sends a request to 'Browser': 'Pick a file'.
- 2. 'Browser' sends a request to 'App server': 'Ask for upload URL'.
- 3. 'App server' replies to 'Browser': 'Temporary URL'.
- 4. 'Browser' sends a request to 'File storage': 'Upload file'.
- 5. 'File storage' replies to 'Browser': 'Uploaded'.
- 6. 'Browser' sends a request to 'App server': 'Report completion'.
- 7. 'App server' replies to 'Browser': 'File record saved'.
- 8. 'Browser' replies to 'User': 'Show preview'.
Shape by shape
| Shape | Symbol | Connections |
|---|---|---|
| User | Actor | → Browser(Pick a file) · ← Browser |
| Browser | Participant and lifeline | → App server(Ask for upload URL), File storage(Upload file), App server(Report completion), User(Show preview) · ← User, App server, File storage, App server |
| App server | Participant and lifeline | → Browser(Temporary URL), Browser(File record saved) · ← Browser, Browser |
| File storage | Participant and lifeline | → Browser(Uploaded) · ← Browser |
Symbols used here
| Symbol | Meaning |
|---|---|
| Participant and lifeline | A box on top and a dashed line below. |
| Actor | A human participant; a stick figure. |
| Synchronous message | A call that waits; solid line, filled head. |
| Reply | The answer; dashed line, open head. |
Diagram text
Paste this text into the editor to get the same picture, then change the names to fit your own work.
# File upload sequence diagram
sequenceDiagram
actor U as User
participant B as Browser
participant S as App server
participant O as File storage
U->>B: Pick a file
B->>S: Ask for upload URL
S-->>B: Temporary URL
B->>O: Upload file
O-->>B: Uploaded
B->>S: Report completion
S-->>B: File record saved
B-->>U: Show preview