# Troubleshooting storage
Source: https://sovaria.in/docs/troubleshooting-storage

Uploads refused (409, 413, content type, quota), downloads denied, links that stop working, files that don't display, and resumable uploads that won't continue.

## 409 "Object … already exists" on upload

- **Cause:** A file is already stored at that path, and uploads never overwrite unless you ask.
- **Check:** List the folder in the console or with `sovaria.storage.listObjects`.
- **Fix:** Pass `upsert: true` (`?upsert=true`) to replace it, or upload under a new name.
- **Verify:** The upload succeeds and the file's last change time updates.

## 413, or an upload refused for its type

- **Cause:** The file is bigger than the bucket's or the plan's largest file, or its content type isn't in the bucket's allowed types.
- **Check:** Bucket › Settings (largest file, allowed types) and the plan table in [Working with files](https://sovaria.in/docs/storage-files).
- **Fix:** Raise the bucket's limit within your plan, add the type, or compress the file. Send large files with resumable uploads.
- **Verify:** The same file uploads.

## 403 with a plan code on upload

- **Cause:** The project's storage is full for the plan (Free stops at its limit; paid plans bill beyond it).
- **Check:** Organization › Usage, storage.
- **Fix:** Delete files you don't need or upgrade ([Billing, invoices and overage](https://sovaria.in/docs/billing)).
- **Verify:** Usage drops below the limit and uploads work again.

## 403 when downloading, listing or uploading as a user

- **Cause:** No bucket rule allows the action for this caller, the bucket is private with no rules, or the path isn't in the user's own folder.
- **Check:** The bucket's **Policies** tab, and the path: own-folder rules need the user's id as the first folder.
- **Fix:** Add a rule for the action (`READ`, `LIST`, `WRITE`, `DELETE`) — [Access, links and delivery](https://sovaria.in/docs/storage-access). A move needs `WRITE` on both the old and new path.
- **Verify:** Simulation shows the action allowed for that kind of user.

## A shared link stopped working

- **Cause:** A signed URL expired (they last from 1 second to 1 day), or the file was moved, replaced or deleted. Public URLs only work for public buckets.
- **Check:** When the link was made and with what `expires_in`; whether the bucket is public.
- **Fix:** Create links when they are needed instead of storing them; use a public bucket for files meant for everyone.
- **Verify:** A fresh link opens the file.

## An image downloads instead of displaying, or shows as text

- **Cause:** The file was stored without its content type (or with the wrong one), and is served with what was stored.
- **Check:** The file's content type in the console.
- **Fix:** Upload again with `contentType` set (and `upsert: true`).
- **Verify:** The browser shows the file inline.

## A resumable upload is refused when continuing

- **Cause:** The chunk was sent with an `Upload-Offset` that isn't where the upload stands (for example a chunk sent twice).
- **Check:** `HEAD` the upload and read `Upload-Offset`.
- **Fix:** Continue from the offset the server reports ([Working with files](https://sovaria.in/docs/storage-files)).
- **Verify:** The final chunk with `X-Upload-Complete: 1` makes the file appear in the bucket.

> **Image resizing:** Render URLs return the original image today; resizing isn't switched on yet ([Access, links and delivery](https://sovaria.in/docs/storage-access)).

## Still stuck?

Email [outreach@sovaria.in](mailto:outreach@sovaria.in) with your project URL, the time it happened (with time zone), the `X-Request-ID` response header or the `trace_id` from the error body, and the bucket name and object path. Never send keys, passwords, tokens or your users' data.
