Skip to content

Commit fe9919a

Browse files
Remove leading slash from s3 key if present
1 parent 28c8b45 commit fe9919a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

processed_data/src/graphql/entities.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,12 @@ impl AutoProcFileAttachment {
281281
.to_string(),
282282
);
283283
key.push(<Option<String> as Clone>::clone(&self.file_name).unwrap());
284-
key.to_string_lossy().to_string()
284+
let key_str = key.to_string_lossy().to_string();
285+
// Remove leading "/" if present
286+
match key_str.strip_prefix('/') {
287+
Some(stripped_key) => stripped_key.to_string(),
288+
None => key_str,
289+
}
285290
}
286291
}
287292

0 commit comments

Comments
 (0)