RAssets
A simple Typescript wrapper to upload assets. See test/index.ts for examples.
getCSRF
This function allows you to get the CSRF token for a specific cookie.
await RAssets.getCSRF("cookie")
getRequestVerificationToken
This function allows you to get the __RequestVerificationToken for a specific cookie
await RAssets.getRequestVerificationToken("cookie")
uploadAudio
This function allows you to upload an audio
const uploadAudio = await RAssets.uploadAudio(cookie, {
name: "test",
file: testAudio.toString("base64"),
paymentSource: "User"
})
upload
This function allows you to upload any asset (CURRENTLY BROKEN)
const uploadAsset = await RAssets.upload(cookie, {content: testImage, name: "test", type: "png"}, {mime: "image/png", assetTypeId: "11"})