SShortSingh.
Back to feed

Solon Framework Offers Simpler File Uploads With UploadedFile Over Spring's MultipartFile

0
·1 views

The Solon Java web framework provides an alternative to Spring Boot's file upload mechanism through its UploadedFile class, which requires no extra configuration or annotations to trigger multipart parsing. Unlike Spring Boot, which relies on MultipartFile, auto-configuration, and servlet container assumptions, Solon gives developers explicit control over parsing and temporary file cleanup. Developers must manually call file.delete() after handling uploads, as Solon does not automatically remove temporary files from disk. The framework supports batch uploads via UploadedFile arrays, mixed file-and-text form submissions, and manual file access through the Context object. For security on public-facing services, Solon allows router-level filters to restrict multipart parsing to specific URL paths, reducing unnecessary processing overhead.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Dev Tutorial: Building a C++ HTTP Server from Scratch Using POSIX TCP Sockets

A multi-part tutorial series has been launched on DEV Community, guiding developers through building an HTTP server from scratch in C++ 17 using POSIX APIs. The first installment focuses on setting up TCP sockets, explaining how sockets serve as communication endpoints between a server and client over a network. The guide walks through creating a basic single-threaded server on port 8080 that accepts client connections and echoes back received data. The server runs indefinitely via a while loop, with the author noting that concurrent multi-client handling via multithreading will be introduced in later parts. The series is planned across four to five posts, with the next entry set to cover parsing HTTP requests and building HTTP responses.

0
ProgrammingDEV Community ·

Developer Reflects on Consistency, Personal Projects, and Why Blogs Still Matter

A developer shares a personal update in their summer log series, describing a gradual return to positive habits and a healthier mindset after a period of struggle. They have started a new personal project that is occupying most of their focus, with a self-imposed deadline set for the following Friday and plans to release the source code if all goes well. The writer also reflects on an article about the continued relevance of blogs in the age of AI, arguing that no model can replicate a person's unique journey, mistakes, and growth. They emphasize that the value of their logs lies not in tutorials but in honest, first-person accounts of how they navigated challenges. The post closes on a quietly optimistic note, with the author committing to keep going despite difficult moments.

0
ProgrammingDEV Community ·

Claude Code Can Now Manage CMS Content Directly via Model Context Protocol

Developers can connect Claude Code to a Cosmic CMS bucket using the Model Context Protocol (MCP), enabling content reading and writing within the same coding session. The integration exposes 18 tools covering objects, media, content models, and AI-generated assets such as text, images, video, and audio. A hosted endpoint at mcp.cosmicjs.com requires no local installation and can be configured in roughly five minutes using a bucket slug and API keys. Users can restrict access to read-only by omitting the write key from the authorization token, adding a layer of safety before granting full permissions. The same configuration also works with Claude Desktop and Cursor, and credentials should be excluded from version control via .gitignore.

0
ProgrammingDEV Community ·

Developer tests Solidity scanner on 6 audited DeFi protocols, finds 14 false positives

A developer building OpenClaw, a heuristic Solidity security scanner, tested the tool against six already-audited DeFi protocols including Yearn, Sablier, Ajna, and Liquity. The scanner produced 14 HIGH or CRITICAL findings across all six codebases, and every single one turned out to be a false positive upon manual verification. Rather than treating this as a failure, the developer argues it demonstrates the tool's core design goal: achieving high precision by staying silent on sound code. Each false positive revealed a specific pattern that fools most scanners, such as misidentifying legitimate one-time init guards, bounded rate parameters, and read-only functions as exploitable vulnerabilities. The exercise highlights that low false-positive rates are what make security tools trustworthy, since a scanner that raises constant false alarms trains developers to ignore its warnings entirely.