SimTX API v24/Packets/CatalogUpload: Difference between revisions
m Clanker moved page SimTX API/Packets/CatalogUpload to SimTX API v24/Packets/CatalogUpload: Archive the v24 protocol reference |
Archive the v24 protocol reference: use the v24 templates, links and categories |
||
| Line 1: | Line 1: | ||
{{SimTX API navigation}} | {{SimTX API v24 navigation}} | ||
{{SimTX packet | {{SimTX packet v24 | ||
| name = CatalogUpload | | name = CatalogUpload | ||
| id = 22 | | id = 22 | ||
| hex = 0x16 | | hex = 0x16 | ||
| direction = c2s | | direction = c2s | ||
| session = [[SimTX API/Extension catalog protocol|Control (catalog)]] | | session = [[SimTX API v24/Extension catalog protocol|Control (catalog)]] | ||
| size = Variable | | size = Variable | ||
| permission = <code>catalog.publish</code> | | permission = <code>catalog.publish</code> | ||
| reply = [[SimTX API/Packets/CatalogUploadResult|CatalogUploadResult]] | | reply = [[SimTX API v24/Packets/CatalogUploadResult|CatalogUploadResult]] | ||
| group = catalog | | group = catalog | ||
}} | }} | ||
'''CatalogUpload''' publishes an extension or preset to the server's [[SimTX API/Extension catalog protocol|extension catalog]], or publishes a new revision of an entry the account already owns. It requires an authenticated control session whose account holds <code>catalog.publish</code>. The server answers with [[SimTX API/Packets/CatalogUploadResult|CatalogUploadResult]]. | '''CatalogUpload''' publishes an extension or preset to the server's [[SimTX API v24/Extension catalog protocol|extension catalog]], or publishes a new revision of an entry the account already owns. It requires an authenticated control session whose account holds <code>catalog.publish</code>. The server answers with [[SimTX API v24/Packets/CatalogUploadResult|CatalogUploadResult]]. | ||
== Layout == | == Layout == | ||
| Line 35: | Line 35: | ||
== Validation == | == Validation == | ||
The server checks the upload against the rules in [[SimTX API/Extension catalog protocol#Upload rules|Upload rules]] and reports the first problem it finds in [[SimTX API/Packets/CatalogUploadResult|CatalogUploadResult]]. Field lengths beyond the limits in the layout above close the connection instead, because the server stops reading the packet. | The server checks the upload against the rules in [[SimTX API v24/Extension catalog protocol#Upload rules|Upload rules]] and reports the first problem it finds in [[SimTX API v24/Packets/CatalogUploadResult|CatalogUploadResult]]. Field lengths beyond the limits in the layout above close the connection instead, because the server stops reading the packet. | ||
Without <code>catalog.publish</code>, the body is read and discarded, and the result is ''Publishing requires catalog.publish''. | Without <code>catalog.publish</code>, the body is read and discarded, and the result is ''Publishing requires catalog.publish''. | ||
| Line 42: | Line 42: | ||
Uploading an entry with the name of an entry the same account already owns replaces it: the ID stays the same and the revision increases. Names are compared without regard to case. | Uploading an entry with the name of an entry the same account already owns replaces it: the ID stays the same and the revision increases. Names are compared without regard to case. | ||
{{SimTX API navbox}} | {{SimTX API v24 navbox}} | ||
[[Category:SimTX API]] | [[Category:SimTX API v24]] | ||
Latest revision as of 16:14, 24 October 2026
| Packet ID | 22(0x16)
|
|---|---|
| Direction | Client → server |
| Session | Control (catalog) |
| Body size | Variable |
| Permission | catalog.publish
|
| Answered by | CatalogUploadResult |
CatalogUpload publishes an extension or preset to the server's extension catalog, or publishes a new revision of an entry the account already owns. It requires an authenticated control session whose account holds catalog.publish. The server answers with CatalogUploadResult.
Layout[edit | edit source]
| Field | Type | Description |
|---|---|---|
packetId |
u8 |
Always 22.
|
kind |
UTF |
extension or preset. At most 16 characters.
|
name |
UTF |
Entry name, 1–64 characters after trimming. |
description |
UTF |
At most 500 characters. |
categoryCount |
i32 |
0–12. |
categories |
categoryCount × UTF |
Each 1–32 characters, no commas or control characters. |
fileCount |
i32 |
1–64 (presets: exactly 1). |
files |
fileCount × { UTF path, UTF content } |
Path at most 128 characters; content at most 60,000 characters and 60,000 UTF-8 bytes. |
Validation[edit | edit source]
The server checks the upload against the rules in Upload rules and reports the first problem it finds in CatalogUploadResult. Field lengths beyond the limits in the layout above close the connection instead, because the server stops reading the packet.
Without catalog.publish, the body is read and discarded, and the result is Publishing requires catalog.publish.
Revisions[edit | edit source]
Uploading an entry with the name of an entry the same account already owns replaces it: the ID stays the same and the revision increases. Names are compared without regard to case.