Use message.referenceId for group upload identification
Reasoning:
File uploads posted as a separate messages with no connection. There is no way to track, whether they were sent together or not
Current state:
Web is using 30-seconds threshold between uploaded files to count them as 'uploaded together'. Other clients have not implemented yet.
Suggestion:
- Keep output of refererenceId as before for backward compatibility: SHA256 format (64 chars length, [a-z0-9] characters allowed)
- Construct in following way:
| 60 chars (0 .. 59) |
1 char - |
3 chars (61 .. 63) |
| unique upload identifier, SHA256 sliced to 60 characters |
delimiter |
numeric order of file in upload, e.g. 001 |
- On each client:
- write referenceId in following format when posting from now on
- backward compatibility - treat all old/new referenceIds as in the old format (64 chars, no logic behind, no decoding) - e.g. keep 10 seconds threshold on Web for grouping
- feature support - slice each referenceId, validate against 32(string)-3(int)-29(string) format - if passes, treat as new and group files using it
Support state
Write in new format:
Read new format (assume it's not breaking previous uploads):
Usage (read referenceId for combining messages)
Old links
Multiple files sharing support 🖼️+🖼️ - API
Multiple files sharing support 🖼️+🖼️ - Frontend
Use message.referenceId for group upload identification
Reasoning:
File uploads posted as a separate messages with no connection. There is no way to track, whether they were sent together or not
Current state:
Web is using 30-seconds threshold between uploaded files to count them as 'uploaded together'. Other clients have not implemented yet.
Suggestion:
-Support state
Write in new format:
Read new format (assume it's not breaking previous uploads):
Usage (read referenceId for combining messages)
Old links
Multiple files sharing support 🖼️+🖼️ - API
Multiple files sharing support 🖼️+🖼️ - Frontend