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

# Review and edit your file

> Upload a document and let Doconda fix it or change it the way you ask.

## Upload the file

```ts theme={null}
import { readFile } from "node:fs/promises"

const file = await doconda.files.upload(await readFile("contract.docx"), "contract.docx")
```

It accepts Word, PDF, PowerPoint, Excel (also `.doc`, `.ppt` and `.xls`), TXT, Markdown and pictures, up to 20 MB. In the browser or on a server that already
receives files, you can pass a `Blob` or a `File` directly.

## Review

No AI: Doconda looks for problems in your Word, PowerPoint, Excel or PDF file (tables that overflow, split
signatures, text that doesn't fit, formula errors, scanned pages without text…) and fixes the safe ones without
touching the content. The full list is in [Review](/en/guides/review).

```ts theme={null}
const reviewed = await doconda.documents.create({ operation: "review", file: file.id })
const report = await doconda.documents.report(reviewed.id)

for (const fix of report.ledger) console.log(fix) // each fix: applied or rejected, and why
for (const issue of report.issues) console.log(issue.message) // what is left to look at
```

## Edit

Ask for the changes in a sentence. Doconda changes only what you ask for and leaves the rest of the document intact.

```ts theme={null}
const edited = await doconda.documents.create({
  operation: "edit",
  file: file.id,
  prompt: "Headings in blue and add a confidentiality clause",
})
const { edits } = await doconda.documents.report(edited.id)
// each change, with the text before and after
```

If something you ask for cannot be done, it shows up as `rejected` in `edits`, with the reason.

## Delete the file

```ts theme={null}
await doconda.files.delete(file.id)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.