This repository was archived by the owner on Aug 10, 2026. It is now read-only.
Repository navigation
[Overwork] Bug: use Notion File Upload API v1/file_uploads and multipart uploads - #3
Open
overwork-app[bot] wants to merge 1 commit into
Open
overwork-app[bot] wants to merge 1 commit into
overwork-app[bot] wants to merge 1 commit into
Conversation
… support - Upgrade @notionhq/client from v2.2.15 to v5.19.0 for file upload API support - Add comprehensive file upload functionality using correct v1/file_uploads endpoint - Implement multipart/form-data uploads as required by Notion API - Support both single-part (≤5MB) and multi-part (>5MB) upload modes - Add 'onotion file' command with subcommands: - upload: Upload files to Notion - attach: Upload and attach files/images to pages - status: Check upload status - list: List file uploads with filtering - Auto-detect image files and create appropriate block types (image vs file) - Support custom filenames, content types, and captions - Add comprehensive test coverage for file upload utilities - Update README with file upload documentation - Temporarily remove deprecated database query functionality due to API changes Fixes #2: Correct endpoint usage from v1/file-uploads to v1/file_uploads Fixes multipart upload implementation using proper multipart/form-data format Files can now be successfully uploaded and attached to Notion pages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #2
Summary
This PR implements the Notion File Upload API v1/file_uploads with proper multipart support, fixing the issues described in #2.
Changes Made
Core File Upload Implementation
POST /v1/file_uploads(underscores, not hyphens) as specified in the issuemultipart/form-datarequests for the/sendendpointNew CLI Commands
Added comprehensive
onotion filecommand with four subcommands:upload <file-path>- Upload files to Notion with options for custom filename, content-type, and upload modeattach <file-path> <page-id>- Upload and immediately attach files to pages as image or file blocksstatus <upload-id>- Check upload status and progress for multi-part uploadslist- List recent uploads with status filtering and paginationSmart File Handling
API Compliance
v1/file_uploadsendpoint (fixing the hyphen issue)Testing & Documentation
Example Usage
Fixes
v1/file_uploadsinstead ofv1/file-uploadsThis implementation fully addresses the requirements in issue #2 and provides a robust file upload solution for the Notion CLI.