Skip to content

fix: make upload description optional and remove default assignment

Kuruva Laxmi requested to merge fix/optional-upload-description into main

🚀 Summary

This MR fixes an issue where a default description was automatically applied when the user provided no input during file upload.

Previously, if the user pressed Enter without entering a description, a predefined default description was assigned to all files, leading to incorrect metadata—especially in bulk uploads.

This change ensures that the description field is treated as optional.


Changes Made

  • Removed fallback to default description when input is empty
  • Updated input handling to treat empty input as None
  • Ensured description field is only included in API payload when provided
  • Updated CLI prompt to indicate optional input
  • Added unit tests to validate correct behavior

🧪 Testing

  • Press Enter → no description applied
  • Enter description → correctly assigned
  • Bulk upload → no unintended default description
  • All tests passing (4 passed)
  • Verified using CLI upload flow

Problem Solved

  • Prevents unintended metadata assignment
  • Fixes incorrect behavior during bulk uploads
  • Improves user control and CLI usability

🔗 Related Issue

Closes #6 (closed)


💡 Impact

  • More accurate metadata handling
  • Better user experience
  • Aligns CLI behavior with user expectations

📌 Notes

  • Description remains optional (not mandatory)
  • Backward compatibility maintained

Merge request reports

Loading