-
Notifications
You must be signed in to change notification settings - Fork 0
File
A file is an uploaded asset (image, video, document, etc.) referenced by Whop resources such as products, courses, and messages. The SDK exposes a single endpoint that creates a file record and returns a presigned URL the client then uploads the bytes to directly.
$client->files // Matchable\Whop\Resource\FileResource| HTTP | POST files |
| Does | Creates a file record and returns a presigned upload URL. The request body is { "filename": $filename }. |
| Parameters |
$filename — the name of the file to be uploaded. |
| Returns |
array — the decoded API response, including the file record and presigned upload URL. |
Note: this resource exposes only
create. Uploading the actual file bytes is done by the caller against the returned presigned URL — it is not an SDK call.
$file = $client->files->create('lesson-thumbnail.png');
// $file contains the file record and a presigned URL to PUT the bytes to.Official Whop documentation: https://docs.whop.com
Core Company · AccountLink · File · AccessToken · AuthorizedUser · User · Member · Webhook
Payments & Billing Payment · Checkout · Plan · Product · Membership · Refund · Invoice · PromoCode · PaymentMethod · SetupIntent
Platform & Finance Transfer · FeeMarkup · Topup · Withdrawal · LedgerAccount · PayoutAccount · PayoutMethod
Disputes Dispute · DisputeAlert · ResolutionCenter
Commerce Shipment · Lead · Entry · Review · Affiliate · Stats
Experiences & Courses Experience · Course · CourseChapter · CourseLesson · CourseLessonInteraction · CourseStudent
Communication ChatChannel · DmChannel · DmMember · Message · Reaction · Forum · ForumPost · SupportChannel · Notification
Advertising AdCampaign · AdGroup · Ad
Apps & AI App · AppBuild · AiChat · CompanyTokenTransaction
Verifications Verification