{"result":{"depiction_url":null,"edges":{"observes":{"objects":[{"created":"2026-09-09T13:47:44Z","object_id":{"id":2287,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_validate_query_args","title":"observe_validate_query_args\/3","uri":"https:\/\/zotonic.com\/id\/2287"},"seq":1}],"predicate":{"id":2550,"is_a":["meta","predicate"],"name":"observes","title":{"_type":"trans","tr":{"en":"Observes"}},"uri":"https:\/\/zotonic.com\/id\/observes"}},"subject":{"objects":[{"created":"2026-09-09T13:47:44Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:47:44Z","object_id":{"id":2563,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_frontend_developer","title":"Frontend developer","uri":"https:\/\/zotonic.com\/id\/2563"},"seq":2},{"created":"2026-09-09T13:47:44Z","object_id":{"id":2580,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_file_uploads","title":"File uploads","uri":"https:\/\/zotonic.com\/id\/2580"},"seq":3},{"created":"2026-09-09T13:47:44Z","object_id":{"id":2635,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_module","title":"Module","uri":"https:\/\/zotonic.com\/id\/2635"},"seq":4},{"created":"2026-09-09T13:47:44Z","object_id":{"id":2645,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_upload","title":"Upload","uri":"https:\/\/zotonic.com\/id\/2645"},"seq":5},{"created":"2026-09-09T13:47:44Z","object_id":{"id":2673,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_javascript","title":"JavaScript","uri":"https:\/\/zotonic.com\/id\/2673"},"seq":6}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":2241,"is_a":["text","documentation","reference","module"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2241"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_module_mod_fileuploader","page_url":{"en":"https:\/\/zotonic.com\/docs\/2241\/mod_fileuploader","x-default":"https:\/\/zotonic.com\/docs\/2241\/mod_fileuploader"},"preview_url":null,"resource":{"version":3031,"pivot_location_lat":null,"title":"mod_fileuploader","is_authoritative":true,"body":"<p>Upload files using a parallel web worker.<\/p>\n<p>This module provides a web worker and server logic to quickly upload files.<\/p>\n<p>The web worker sends files in 128KB parts to the server, the server recombines all parts to a single file. The web\nworker is using multiple parallel uploaders to make optimal use of the available bandwidth.<\/p>\n<p>Files are sent to the webworker on the topic <code>model\/fileuploader\/post\/new<\/code>:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-javascript\">let f = document.getElementById(&quot;upload_file&quot;).files[0];\n\nlet msg = {\n    files: [\n        {\n            name: &quot;resultname&quot;,             \/\/ The name used in the ready message\n            upload: &quot;WZkhXoaMwrK2StUHmdpp&quot;, \/\/ Unique name to register the upload process. It&#39;s generated by the server if undefined\n            file: f                         \/\/ Must be a File object\n        }\n    ],\n\n    start_topic: &quot;bridge\/origin\/foo&quot;, \/\/ Receives the upload metadata when the upload starts\n\n    ready_msg: {\n        foo: &quot;bar&quot;,                 \/\/ Anything you want to send if all files are uploaded\n        files: []                   \/\/ This will be set by the worker\n    },\n    ready_topic: &quot;bridge\/origin\/foo\/bar&quot;,\n\n    progress_msg: {\n        form_id: &quot;some-element-id&quot;,\n        is_auto_unmask: true,\n        percentage: 0               \/\/ Will be set by the uploader, 100 when ready\n    },\n    progress_topic: &quot;zotonic-transport\/progress&quot;\n};\ncotonic.broker.publish(&quot;model\/fileuploader\/post\/new&quot;, msg);\n<\/code><\/pre>\n<p>The files received with the <code>ready_msg<\/code> on the <code>ready_topic<\/code> will be:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-javascript\">{\n    name: &quot;resultname&quot;,             \/\/ Name provided in the upload\n    upload: &quot;WZkhXoaMwrK2StUHmdpp&quot;  \/\/ Unique name to use with z_fileuploader:status\/1\n}\n<\/code><\/pre>\n<p>An upload can be canceled by publishing the topic <code>model\/fileuploader\/post\/delete\/+name<\/code>, where the name is the unique\nname generated by the server.<\/p>\n<h2>Accepted Events<\/h2>\n<p>This module handles the following notifier callbacks:<\/p>\n<ul><li><code>observe_validate_query_args<\/code>: Replace all #fileuploader{} records with #upload{} and the uploaded file using <code>z_fileuploader:status<\/code>.<\/li><\/ul>\n<p>Delegate callbacks:<\/p>","slug":"mod_fileuploader","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"b464614fed8bf9889624c081d83a546cb155ea1484ba482de889fd2af8187c7b","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":320,"is_a":["meta","category"],"name":"module","title":"Modules","uri":"https:\/\/test.zotonic.com\/id\/320"},"doc_source_path":"apps\/zotonic_mod_fileuploader\/src\/mod_fileuploader.erl","publication_start":"2023-06-24T08:17:54Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_fileuploader\/src\/mod_fileuploader.erl","pivot_location_lng":null,"doc_source_kind":"module","name":"doc_module_mod_fileuploader","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2021-02-26T16:40:01Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_fileuploader","publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"66cb145eae7002b184e7d8c4c7bba5e53e8248e5\n","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-10-02T12:40:19Z","title_slug":"mod_fileuploader"},"uri":"https:\/\/zotonic.com\/id\/2241","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2241"}},"status":"ok"}