Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
SimTX Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
SimTX API/Packets/CatalogUpload
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{SimTX API navigation}} {{SimTX packet | name = CatalogUpload | frame = ClientFrame | field = 38 | member = catalog_upload | direction = c2s | session = [[SimTX API/Extension catalog protocol|Control (catalog)]] | roles = <code>ROLE_CONTROL</code>, authenticated. | permission = <code>catalog.publish</code> | reply = [[SimTX API/Packets/CatalogUploadResult|CatalogUploadResult]] or [[SimTX API/Packets/Error|Error]] | group = catalog | file = control.proto }} '''CatalogUpload''' publishes an extension or preset to the server's [[SimTX API/Extension catalog protocol|extension catalog]], or a new revision of an entry the account already owns. == Definition == <syntaxhighlight lang="protobuf"> message CatalogUpload { int64 request_id = 1; string kind = 2; string name = 3; string description = 4; repeated string categories = 5; repeated CatalogFile files = 6; } </syntaxhighlight> == Fields == {| class="wikitable" ! # !! Field !! Type !! Description |- | 1 || <code>request_id</code> || <code>int64</code> || Nonzero; echoed in the [[SimTX API/Packets/CatalogUploadResult|CatalogUploadResult]] or [[SimTX API/Packets/Error|Error]]. |- | 2 || <code>kind</code> || <code>string</code> || <code>extension</code> or <code>preset</code>. At most 16 characters. |- | 3 || <code>name</code> || <code>string</code> || Entry name, 1 to 64 characters after trimming. Unique per server, compared without regard to case. |- | 4 || <code>description</code> || <code>string</code> || At most 500 characters. |- | 5 || <code>categories</code> || <code>repeated string</code> || 0 to 12 categories, each 1 to 32 characters, no commas or control characters. |- | 6 || <code>files</code> || <code>repeated</code> [[SimTX API/Data types#CatalogFile|CatalogFile]] || 1 to 64 files; a preset is exactly one <code>.stxpreset</code> file. |} == Validation == The server checks the upload against the [[SimTX API/Extension catalog protocol#Upload rules|upload rules]]. A refused upload is answered with [[SimTX API/Packets/Error|Error]] whose <code>message</code> names the first problem found: * <code>FORBIDDEN</code>: <i>Publishing requires catalog.publish</i>, or the name belongs to another account (<i>An item named 'X' already exists (by Author)</i>). * <code>INVALID_REQUEST</code>: an unknown kind, a preset that is not exactly one <code>.stxpreset</code> file, an invalid path, name, category or manifest. Manifest errors are passed through verbatim. * <code>LIMIT_REACHED</code>: <i>Catalog entry quota reached (32)</i>, <i>Catalog storage quota reached</i>, <i>Server catalog storage is full</i>. * <code>UNAVAILABLE</code>: <i>This server has no catalog</i>, <i>The catalog is temporarily unavailable</i>. * <code>INTERNAL</code>: <i>Could not store the item</i>. Show the message to the user; it says what to fix. == Revisions == Uploading an entry with the name of an entry the same account already owns replaces it: the ID stays, the revision increases, and the result has <code>updated = true</code>. Names are compared without regard to case. == See also == * [[SimTX API/Extension catalog protocol]] * [[SimTX API/Packets/CatalogUploadResult|CatalogUploadResult]] {{SimTX API navbox}} [[Category:SimTX API]]
Summary:
Please note that all contributions to SimTX Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
SimTX Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:SimTX API navbox
(
edit
)
Template:SimTX API navigation
(
edit
)
Template:SimTX packet
(
edit
)