import { whopApi } from "@/lib/whop-api";
const result = await whopApi.uploadMedia({
input: {
// The size of the file in bytes
byteSize: 10,
// The size of the file in bytes
byteSizeV2: "9999999",
// The checksum of the file
checksum: "some string" /* Required! */,
// The content type of the file
contentType: "some string",
// The filename of the file
filename: "some string" /* Required! */,
// The metadata of the file
metadata: "Error(Unknown scalar type: JSON)",
// Whether or not to use multipart upload. The file must be larger than 5MB
multipart: true,
// The type of record to attach the file to
record:
"abuse_report" /* Valid values: abuse_report | access_pass | app | automated_messages_config | bot | bounty | bounty_submission | competition_prize | content_reward_campaign | content_reward_submission | dispute | dms_post | experience | forum_post | resolution_event_upload | review | review_report | user */ /* Required! */,
},
});
Was this page helpful?