Skip to content

feat: add media command (mediaStorage), deprecate upload#78

Merged
danmrichards merged 2 commits into
mainfrom
feat/media-storage
Jul 10, 2026
Merged

feat: add media command (mediaStorage), deprecate upload#78
danmrichards merged 2 commits into
mainfrom
feat/media-storage

Conversation

@felixsanz

Copy link
Copy Markdown
Contributor

Adds a media command group backed by the mediaStorage task:

  • runware media upload <file|url> — store media, returns mediaUUID + mediaURL
  • runware media delete <mediaUUID> — permanently delete stored media

Deprecates the upload command (kept, still works) in favor of media upload, matching the SDK deprecation of imageUploadmediaStorage. Extracts the shared image-input builder into cmdutil.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. To trigger a review, include coderabbit-review in the PR description. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 43c4a769-49ad-4048-918f-03ec693b9912

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/media-storage

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new runware media command group backed by the mediaStorage API task (upload + delete), refactors the shared local-path/URL/data-URI input handling into internal/cmdutil, and marks the legacy runware upload command as deprecated.

Changes:

  • Add runware media upload and runware media delete commands wired to Client.MediaStorage.
  • Extract the shared image input builder into internal/cmdutil.BuildImageInput with unit tests.
  • Deprecate (but keep) runware upload, and update end-user docs to highlight media.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Replaces the “Upload” section with “Media”, documenting media upload/delete and noting upload is deprecated.
internal/cmdutil/mediainput.go New shared helper to turn `<file
internal/cmdutil/mediainput_test.go Updates and relocates tests to cover cmdutil.BuildImageInput.
internal/cmd/upload/upload.go Deprecates upload command and switches to using cmdutil.BuildImageInput.
internal/cmd/root.go Registers the new media command group on the root command.
internal/cmd/media/upload.go Implements runware media upload (calls MediaStorage(upload, ...)) and prints mediaUUID/mediaURL/taskUUID.
internal/cmd/media/media.go Defines the media command group and attaches upload/delete subcommands.
internal/cmd/media/delete.go Implements runware media delete (calls MediaStorage(delete, <uuid>)) and prints mediaUUID/taskUUID.
internal/api/types.go Adds MediaStorageRequest / MediaStorageResult types for the new task.
internal/api/media_storage_test.go Adds unit tests validating request construction and response parsing for upload/delete operations.
internal/api/constants.go Adds taskTypeMediaStorage and operation constants (upload, delete).
internal/api/client.go Adds Client.MediaStorage and documents UploadImage as superseded.
docs/runware.md Adds runware media to top-level docs list (but removes runware upload entry).
docs/runware_media.md Adds docs page for the runware media command group.
docs/runware_media_upload.md Adds docs page for runware media upload.
docs/runware_media_delete.md Adds docs page for runware media delete.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/cmd/upload/upload.go
Comment thread internal/api/client.go
Comment thread internal/cmdutil/mediainput.go Outdated
Comment thread docs/runware.md

@danmrichards danmrichards left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linter isn't happy with one of your tests

Comment thread internal/cmd/upload/upload.go
Comment thread internal/cmd/media/delete.go
@felixsanz felixsanz force-pushed the feat/media-storage branch from ee4c360 to c499ee2 Compare July 10, 2026 15:15
danmrichards
danmrichards previously approved these changes Jul 10, 2026
@danmrichards danmrichards merged commit 5d410c7 into main Jul 10, 2026
4 checks passed
@danmrichards danmrichards deleted the feat/media-storage branch July 10, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants