diff --git a/package.json b/package.json
index 9f1ad841c..444872eba 100644
--- a/package.json
+++ b/package.json
@@ -30,6 +30,7 @@
"flexsearch": "^0.7.31",
"glob": "^8.1.0",
"gray-matter": "^4.0.3",
+ "jsdom": "^22.1.0",
"linkinator": "^5.0.2",
"mdast-util-to-string": "^3.1.1",
"mermaid": "^9.3.0",
@@ -42,7 +43,6 @@
"unist-util-find-after": "^4.0.1",
"unist-util-visit": "^4.1.2",
"vitest": "^0.28.3",
- "vue": "^3.2.47",
- "jsdom": "^22.1.0"
+ "vue": "^3.2.47"
}
}
diff --git a/src/__tests__/__snapshots__/links.integration.test.js.snap b/src/__tests__/__snapshots__/links.integration.test.js.snap
index b07dd6855..6cd6fe44d 100644
--- a/src/__tests__/__snapshots__/links.integration.test.js.snap
+++ b/src/__tests__/__snapshots__/links.integration.test.js.snap
@@ -304,8 +304,12 @@ exports[`the build should not break any links 1`] = `
"/api/managed-integrations#paypal-referral",
"/api/managed-integrations#top",
"/api/media-uploads",
+ "/api/media-uploads#attributes",
+ "/api/media-uploads#attributes-1",
"/api/media-uploads#contents",
+ "/api/media-uploads#create-a-presigned-url-for-media-upload",
"/api/media-uploads#create-a-presigned-url-for-media-upload-experimental",
+ "/api/media-uploads#get-media-upload-location",
"/api/media-uploads#get-media-upload-location-experimental",
"/api/media-uploads#media-upload",
"/api/media-uploads#media-uploads",
diff --git a/src/components/CodeGroup.astro b/src/components/CodeGroup.astro
new file mode 100644
index 000000000..d16fb0883
--- /dev/null
+++ b/src/components/CodeGroup.astro
@@ -0,0 +1,3 @@
+
+
+
diff --git a/src/components/Column.astro b/src/components/Column.astro
new file mode 100644
index 000000000..7eb86336b
--- /dev/null
+++ b/src/components/Column.astro
@@ -0,0 +1,8 @@
+
+---
+const { sticky = false } = Astro.props;
+---
+
+:first-child]:mt-0 [&>:last-child]:mb-0 xl:sticky xl:top-24' : '[&>:first-child]:mt-0 [&>:last-child]:mb-0'}`>
+
+
diff --git a/src/components/Endpoint.astro b/src/components/Endpoint.astro
new file mode 100644
index 000000000..b29ad194e
--- /dev/null
+++ b/src/components/Endpoint.astro
@@ -0,0 +1,18 @@
+---
+import Eyebrow from './Eyebrow.astro';
+import Row from './Row.astro';
+import Column from './Column.astro';
+
+const { method, path, experimental = false } = Astro.props;
+---
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/Eyebrow.astro b/src/components/Eyebrow.astro
new file mode 100644
index 000000000..34fca3d95
--- /dev/null
+++ b/src/components/Eyebrow.astro
@@ -0,0 +1,24 @@
+---
+const { method, path } = Astro.props;
+const valueColorMap = {
+ GET: 'emerald',
+ POST: 'sky',
+ PUT: 'amber',
+ DELETE: 'rose',
+};
+const color = valueColorMap[method] || 'emerald';
+const colorStyles = {
+ emerald: 'ring-emerald-300 dark:ring-emerald-400/30 bg-emerald-400/10 text-emerald-500 dark:text-emerald-400',
+ sky: 'ring-sky-300 bg-sky-400/10 text-sky-500 dark:ring-sky-400/30 dark:bg-sky-400/10 dark:text-sky-400',
+ amber: 'ring-amber-300 bg-amber-400/10 text-amber-500 dark:ring-amber-400/30 dark:bg-amber-400/10 dark:text-amber-400',
+ rose: 'ring-rose-200 bg-rose-50 text-red-500 dark:ring-rose-500/20 dark:bg-rose-400/10 dark:text-rose-400',
+}
+---
+
+
+
+ { method }
+
+ { path }
+
+
diff --git a/src/components/ProseCode.vue b/src/components/ProseCode.vue
index 72c0a27ff..225f6bcbb 100644
--- a/src/components/ProseCode.vue
+++ b/src/components/ProseCode.vue
@@ -1,6 +1,6 @@
diff --git a/src/components/Row.astro b/src/components/Row.astro
new file mode 100644
index 000000000..46978294c
--- /dev/null
+++ b/src/components/Row.astro
@@ -0,0 +1,3 @@
+
+
+
diff --git a/src/content/api/media-uploads.mdx b/src/content/api/media-uploads.mdx
index 5e5b0fca4..3c5a090fe 100644
--- a/src/content/api/media-uploads.mdx
+++ b/src/content/api/media-uploads.mdx
@@ -8,6 +8,8 @@ nav:
---
import Properties from '../../components/Properties.astro';
import Property from '../../components/Property.astro';
+import Endpoint from '../../components/Endpoint.astro';
+import CodeGroup from '../../components/CodeGroup.astro';
## Model
@@ -46,3 +48,80 @@ import Property from '../../components/Property.astro';
The User or API Key that updated the Media Upload.
+
+---
+
+
+ ## Create a presigned URL for Media Upload
+
+ This endpoint allows you to upload a media file to Centrapay. It returns a presigned URL that can be used to download the media file.
+
+ ### Attributes
+
+
+ The Media Upload's owning Centrapay Account id.
+
+
+
+ The media (MIME) type of the upload.
+
+
+
+ The file name of the upload.
+
+
+
+
+ ```bash
+ curl -X POST https://service.centrapay.com/api/media-uploads \
+ -H "X-Api-Key: $api_key" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "accountId": "Jaim1Cu1Q55uooxSens6yk",
+ "mimeType": "image/png",
+ "fileName": "image.png"
+ }'
+ ```
+
+ ```json
+ {
+ "id": "DKTs3U38hdhfEqwF1JKoT2",
+ "uploadUrl": "https://media-upload.centrapay.com/image.png?jhbdsfau67ewejshb=487hsdjhbdgs743"
+ }
+ ```
+
+
+
+
+---
+
+
+ ## Get Media Upload Location
+
+ This endpoint allows you to retrieve the upload location of a media file.
+
+ ### Attributes
+ No attributes.
+
+
+ ```bash
+ curl https://service.centrapay.com/api/media-uploads/DKTs3U38hdhfEqwF1JKoT2/location \
+ -H "X-Api-Key: $api_key"
+ ```
+
+ ```json
+ {
+ "url": "https://media-upload.centrapay.com/image.png?jhbdsfau67ewejshb=487hsdjhbdgs743"
+ }
+ ```
+
+
+