Toggle the privacy setting of an upload between public and private.
Request
This endpoint toggles the upload’s current privacy state — it does not read the request body. Calling it once on a public upload makes it private; calling it again makes it public again. No request body is required, and any body sent is ignored.
curl -X PATCH https://fucksornot.com/api/upload/550e8400-e29b-41d4-a716-446655440000/privacy \
-H "Cookie: auth-token=YOUR_JWT_TOKEN"
Response
{
"success": true,
"upload": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"user_id": "user-uuid",
"filename": "abc123.webp",
"original_name": "myimage.jpg",
"description": "Check out this cool gadget",
"upload_type": "image",
"external_url": null,
"upvotes": 42,
"downvote_count": 5,
"is_private": 1,
"created_at": "2025-01-24T12:00:00Z"
},
"is_private": 1
}
| Field | Type | Description |
|---|
success | boolean | Whether the toggle succeeded |
upload | object | The updated upload object, reflecting the new privacy state |
is_private | integer | The upload’s privacy state after the toggle (0 = public, 1 = private) |
Privacy Behavior
Private Uploads
- Don’t appear in public feeds or search
- Don’t appear on your public profile
- Still accessible if you know the direct URL
- Only you and admins can view via the API
Public Uploads
- Appear in all public feeds
- Show on your public profile
- Searchable by tags
Errors
| Status | Description |
|---|
| 401 | Not authenticated |
| 404 | Upload not found, or you’re not the owner (both cases return 404 to avoid confirming the upload’s existence) |