MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / begin_upload

Method begin_upload

mserver/MasterService/src/mods.rs:249–265  ·  view source on GitHub ↗

Begin a streamed artifact upload to a unique temporary object.

(&self)

Source from the content-addressed store, hash-verified

247 if let Some(prefix) = &self.prefix {
248 path.strip_prefix(prefix.as_ref())
249 .and_then(|rest| rest.strip_prefix('/'))
250 .unwrap_or(path)
251 } else {
252 path
253 }
254 }
255
256 /// Store the first immutable package revision under a stable slug identity.
257 pub async fn publish_mod(&self, input: &PublishModInput) -> Result<ModCatalogEntry> {
258 let slug = slugify(&input.name);
259 if slug.is_empty() {
260 bail!(
261 "mod name '{}' has no usable characters for an id",
262 input.name
263 );
264 }
265 if input.file.is_empty() {
266 bail!("mod artifact is empty");
267 }
268 if self.get_mod(&slug).await?.is_some() {

Calls 1

store_pathMethod · 0.80

Tested by

no test coverage detected