JavaScript
import Morphik from 'morphik'; const client = new Morphik({ apiKey: 'My API Key', }); const document = await client.documents.updateFile('document_id', { file: fs.createReadStream('path/to/file'), }); console.log(document.app_id);
{ "content_type": "<string>", "external_id": "<string>", "filename": "<string>", "metadata": {}, "metadata_types": {}, "storage_info": {}, "storage_files": [ { "bucket": "<string>", "key": "<string>", "version": 1, "filename": "<string>", "content_type": "<string>", "timestamp": "2023-11-07T05:31:56Z" } ], "system_metadata": {}, "additional_metadata": {}, "chunk_ids": [ "<string>" ], "folder_name": "<string>", "end_user_id": "<string>", "app_id": "<string>" }
Update a document with content from a file using the specified strategy.
Successful Response
Represents a document stored in the database documents collection
Show child attributes
Was this page helpful?