<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/when-a-file-is-uploaded-run-the-job-on-neon-r0fjcimoy" -->

---
title: When a file is uploaded, run the job on Neon | daily.dev
description: Neon Object Storage and Neon Functions have reached general availability, and a new storage_object_created trigger lets a Neon Function fire automatically when...
canonical: https://daily.dev/posts/when-a-file-is-uploaded-run-the-job-on-neon-r0fjcimoy
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: When a file is uploaded, run the job on Neon | daily.dev
og:description: Neon Object Storage and Neon Functions have reached general availability, and a new storage_object_created trigger lets a Neon Function fire automatically when...
og:url: https://daily.dev/posts/when-a-file-is-uploaded-run-the-job-on-neon-r0fjcimoy
og:image: https://api.daily.dev/og/posts/R0FjCIMoy.png
og:image:alt: When a file is uploaded, run the job on Neon
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# When a file is uploaded, run the job on Neon

**[Neon](https://daily.dev/sources/neontech)** · 5 min read · 12 upvotes · 1 comments

## Summary

Neon Object Storage and Neon Functions have reached general availability, and a new storage_object_created trigger lets a Neon Function fire automatically when a file lands in a bucket, without polling code. The Function receives the bucket name and object key, runs long enough to do real work, and can wake a scaled-to-zero Postgres compute when it queries the database. Suggested use cases include cataloging uploads in Postgres, generating derived images, adding AI-generated metadata via Neon AI Gateway, turning documents and audio into searchable embeddings, and moderating or redacting uploads. Triggers are branch-scoped like the rest of the Neon backend: child branches inherit a copy of a trigger but it starts disabled to avoid reprocessing inherited files. Setup can be done via a neon.ts config-as-code file with neon deploy provisioning the bucket, Function, and trigger together. A related schedule trigger type, for cron-based Function runs, also shipped.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://neon.com/blog/when-a-file-is-uploaded-run-the-job-on-neon>

## Questions this post answers

### How do I run code automatically when a file is uploaded to Neon Object Storage?

Create a storage_object_created function trigger, which invokes a specified Neon Function whenever an object is created in a chosen bucket. Neon sends the Function an HTTP POST containing the bucket name and object key, so no application code has to poll the bucket. An optional key prefix scopes the trigger to a specific path, such as originals/, and the trigger can be defined declaratively in a neon.ts config file deployed with neon deploy.

_daily.dev surfaces updates like this for developers wiring file uploads into event-driven Postgres pipelines._

### Do Neon Function Triggers still work if my Postgres compute has scaled to zero?

Yes, storage_object_created and schedule triggers are compatible with scale to zero. If the Function runtime was idle, Neon starts it when the upload event arrives, and if that Function then queries a Postgres compute that has scaled to zero, the query wakes the compute automatically, so no idle capacity needs to be kept running just to catch events.

_Developers optimizing serverless database costs can track scale-to-zero behavior changes on daily.dev._

### How do Neon Function Triggers behave on child branches?

A child branch gets its own view of the bucket and objects, its own function URL, and an inherited copy of any parent trigger, but inherited triggers are disabled by default on the child. This prevents a newly created dev branch from immediately reprocessing the same files its parent already handled; enabling the trigger on the child lets test uploads and resulting Postgres writes stay isolated there.

_Teams branching databases for testing can follow branching-behavior changes like this via daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@trevorsuna** · 0 upvotes

> Starting inherited triggers disabled on child branches is a smart safeguard against replaying production objects in previews. I’d also make handlers idempotent and record the object version with each job, because retries and overwrites are where a clean event-driven flow usually gets messy.

## Similar posts on daily.dev

- [Your Neon Functions can now run on a schedule](https://daily.dev/posts/your-neon-functions-can-now-run-on-a-schedule-eeyvvs76j) · Neon · 18 upvotes · 3 comments
- [Building Neon Object Storage](https://daily.dev/posts/building-neon-object-storage-o1dc0zj6r) · Neon · 13 upvotes · 3 comments
- [Neon Functions: backend logic next to your data](https://daily.dev/posts/neon-functions-backend-logic-next-to-your-data-zsp0ccejk) · Neon · 20 upvotes · 3 comments
- [Test out the Neon backend: Object Storage, Functions, and AI Gateway are beta](https://daily.dev/posts/test-out-the-neon-backend-object-storage-functions-and-ai-gateway-are-beta-bbbecva59) · Neon · 8 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#postgresql](https://daily.dev/tags/postgresql), [#serverless](https://daily.dev/tags/serverless)

[View this post on daily.dev](https://daily.dev/posts/when-a-file-is-uploaded-run-the-job-on-neon-r0fjcimoy)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"When a file is uploaded, run the job on Neon","url":"https://daily.dev/posts/when-a-file-is-uploaded-run-the-job-on-neon-r0fjcimoy","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/when-a-file-is-uploaded-run-the-job-on-neon-r0fjcimoy"},"datePublished":"2026-09-22T15:21:21.818Z","dateModified":"2026-09-22T15:22:25.368Z","description":"Neon Object Storage and Neon Functions have reached general availability, and a new storage_object_created trigger lets a Neon Function fire automatically when...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ab2122d04ddca4f2507d72fa2fbb2eac?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ab2122d04ddca4f2507d72fa2fbb2eac?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Neon","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Neon","logo":"https://media.daily.dev/image/upload/s--65EDghou--/f_auto/v1724339118/logos/neontech","url":"https://daily.dev/sources/neontech"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/when-a-file-is-uploaded-run-the-job-on-neon-r0fjcimoy","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":12},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"architecture,postgresql,serverless","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Neon","item":"https://daily.dev/sources/neontech"},{"@type":"ListItem","position":3,"name":"When a file is uploaded, run the job on Neon"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/when-a-file-is-uploaded-run-the-job-on-neon-r0fjcimoy","comment":[{"@type":"Comment","text":"Starting inherited triggers disabled on child branches is a smart safeguard against replaying production objects in previews. I’d also make handlers idempotent and record the object version with each job, because retries and overwrites are where a clean event-driven flow usually gets messy.","datePublished":"2026-09-24T06:11:22.931Z","url":"https://daily.dev/posts/R0FjCIMoy#c-XEhVovKy6","author":{"@type":"Person","name":"Trevor Suna","url":"https://daily.dev/trevorsuna","image":"https://media.daily.dev/image/upload/s--dZ7gXxpp--/f_auto/v1784081551/avatars/avatar_EMoP47rpuw8DNjhp6R1b6?_a=BAMAMicg0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/when-a-file-is-uploaded-run-the-job-on-neon-r0fjcimoy#faq","mainEntity":[{"@type":"Question","name":"How do I run code automatically when a file is uploaded to Neon Object Storage?","acceptedAnswer":{"@type":"Answer","text":"Create a storage_object_created function trigger, which invokes a specified Neon Function whenever an object is created in a chosen bucket. Neon sends the Function an HTTP POST containing the bucket name and object key, so no application code has to poll the bucket. An optional key prefix scopes the trigger to a specific path, such as originals/, and the trigger can be defined declaratively in a neon.ts config file deployed with neon deploy. daily.dev surfaces updates like this for developers wiring file uploads into event-driven Postgres pipelines."}},{"@type":"Question","name":"Do Neon Function Triggers still work if my Postgres compute has scaled to zero?","acceptedAnswer":{"@type":"Answer","text":"Yes, storage_object_created and schedule triggers are compatible with scale to zero. If the Function runtime was idle, Neon starts it when the upload event arrives, and if that Function then queries a Postgres compute that has scaled to zero, the query wakes the compute automatically, so no idle capacity needs to be kept running just to catch events. Developers optimizing serverless database costs can track scale-to-zero behavior changes on daily.dev."}},{"@type":"Question","name":"How do Neon Function Triggers behave on child branches?","acceptedAnswer":{"@type":"Answer","text":"A child branch gets its own view of the bucket and objects, its own function URL, and an inherited copy of any parent trigger, but inherited triggers are disabled by default on the child. This prevents a newly created dev branch from immediately reprocessing the same files its parent already handled; enabling the trigger on the child lets test uploads and resulting Postgres writes stay isolated there. Teams branching databases for testing can follow branching-behavior changes like this via daily.dev."}}]}
```

