Media server/FileBackend
From Wikitech
Needed operations are in the following table. In addition, we need three spaces: one which is publicly accessible, and another which is private (for deleted files), and a third which is private and temporary.
| Operation | Existing function name |
|---|---|
| File existence | fileExists |
| File MD5 (for storeBatch) | no |
| Write from filesystem | store |
| Write from virtual URL | publish |
| Read into filesystem | getPath() (doesn't exactly have the right semantics) |
| Open stream | no |
| Get a file's properties | getFileProps (fallback is to read the file into the filesystem and fetch them that way) |
| List files | getThumbnailList (sorta) |
| Delete files | deleteBatch |
| Rename files | LocalFileMoveBatch (although copy && delete is a substitute) |
| Append to a file | append -- may be tricky with some object stores |
| Finish appending to the file | appendFinish |
Appends
Chunked uploads, and perhaps some other things, require appending to an existing object.
We may need to devise workarounds (such as migrating from one obj to another in a temp space) for those.
- Swift: we know this is possible.
- Azure: we know it's possible from .net; Ben(MS) is checking if can be done from general code
- S3: ???