Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@cocreate/file

CoCreate-app2kAGPL-3.01.19.5

A versatile, configurable headless file uploader supporting local and server operations. Accessible via a JavaScript API and HTML5 attributes, it provides seamless file reading, writing, and uploading with fallbacks to the standard HTML5 file input API. I

file-uploader, headless, html5-attributes, server-upload, customizable-uploader, file-upload-api, no-ui-upload, background-file-upload, programmatic-file-upload, headless-file-management, cocreate, low-code-framework, cocreatejs, cocreatejs-component, cocreate-framework, low-code, realtime, realtime-framework, shared-editing, html5-framework, javascript-framework

readme

CoCreate-file

CoCreate-file is an advanced, configurable headless file uploader designed for comprehensive file management capabilities without a traditional user interface. Accessible via a JavaScript API and HTML5 attributes, it offers unparalleled flexibility in handling file operations on both local and server environments. Take it for a spin in our playground!

minified gzip brotli GitHub latest release License Hiring

Key Features

  • JavaScript API & HTML5 Customization: Easily manage file uploads and operations through a powerful JavaScript API or by utilizing HTML5 attributes for easy integration and customization.
  • Local & Server File Operations: Supports reading, writing, and uploading files both locally and to the server, catering to a wide range of application needs.
  • Graceful Fallbacks: Implements graceful fallbacks to the standard HTML5 file input API, ensuring compatibility and functionality across different browsers and environments.
  • Headless File Management: Designed for use in headless applications or scenarios where a UI is not required or desired, providing a clean, efficient backend solution for file management.

CoCreate-file

Docs & Demo

For a complete guide and working demo refer to the doumentation

CDN

<script src="https://cdn.cocreate.app/file/latest/CoCreate-file.min.js"></script>
<script src="https://cdn.cocreate.app/file/latest/CoCreate-file.min.css"></script>

NPM

$ npm i @cocreate/file

yarn

$ yarn install @cocreate/file

Table of Contents

Announcements

All updates to this library are documented in our CHANGELOG and releases. You may also subscribe to email for releases and breaking changes.

Roadmap

If you are interested in the future direction of this project, please take a look at our open issues and pull requests. We would love to hear your feedback.

About

CoCreate-file is guided and supported by the CoCreate Developer Experience Team.

Please Email the Developer Experience Team here in case of any queries.

CoCreate-file is maintained and funded by CoCreate. The names and logos for CoCreate are trademarks of CoCreate, LLC.

How to Contribute

We encourage contribution to our libraries (you might even score some nifty swag), please see our CONTRIBUTING guide for details.

We want this library to be community-driven, and CoCreate led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create issues and pull requests or merely upvote or comment on existing issues or pull requests.

We appreciate your continued support, thank you!

License

This software is dual-licensed under the GNU Affero General Public License version 3 (AGPLv3) and a commercial license.

  • Open Source Use: For open-source projects and non-commercial use, this software is available under the AGPLv3. The AGPLv3 allows you to freely use, modify, and distribute this software, provided that all modifications and derivative works are also licensed under the AGPLv3. For the full license text, see the LICENSE file.

  • Commercial Use: For-profit companies and individuals intending to use this software for commercial purposes must obtain a commercial license. The commercial license is available when you sign up for an API key on our website. This license permits proprietary use and modification of the software without the copyleft requirements of the AGPLv3. It is ideal for integrating this software into proprietary commercial products and applications.

If you have not purchased a commercial license and intend to use this software for commercial purposes, you are required to sign up for an API key on our website.

changelog

1.19.5 (2025-05-01)

Bug Fixes

1.19.4 (2025-04-30)

Bug Fixes

  • added css-loader (76ce0e7)
  • update query attributes (52612c0)
  • updated cocreate modules versions (d27f8e8)
  • webpack.config and devdependencies (41c2a5a)

1.19.3 (2025-04-11)

Bug Fixes

  • fire action end event on elememt instead of document (3e78905)
  • update observer observe param to type and and attributeName to attributeFilter (524a05e)

1.19.2 (2025-01-18)

Bug Fixes

1.19.1 (2024-12-14)

Bug Fixes

  • fileElement refrence (6042290)
  • if no file.id set id using pathname in getCustomData() (f1ef237)
  • improved handeling of multiple (c56ac70)

1.19.0 (2024-11-04)

Bug Fixes

  • observer taget has been renamed to selector (edccd76)
  • pretier.config.js and file formating (a9af856)
  • return if typeof file not object (d0463e4)

Features

  • add prettier.config.js and format files (1929bea)
  • add prettier.config.js and format files (499e705)

1.18.0 (2024-08-24)

Bug Fixes

  • handle file.id when setFile() rendering. (f9a561b)

Features

1.17.5 (2024-06-19)

Bug Fixes

  • getFileId uses pathname as id (be330a5)
  • observer target selector (50dc031)
  • replace selected file if multiple false (d419dc3)

1.17.4 (2024-06-12)

Bug Fixes

1.17.3 (2024-05-08)

Bug Fixes

  • description length less than 350 characters (c2a9a7a)

1.17.2 (2024-04-29)

Bug Fixes

  • bump cocreate dependencies (6034fc5)

1.17.1 (2024-04-26)

Bug Fixes

  • condition to check input.ProcessFIle exists (478d652)
  • getFiles returns files as is without conversion (ad57ce3)
  • method set to static object.update (27dbf8e)
  • replaced keyword spaces with hyphens and lowercase letters only (77f9d89)

1.17.0 (2024-03-18)

Bug Fixes

Features

  • handle mediaSegmentation, define path (4c8e478)

1.16.0 (2024-02-16)

Features

  • if realtime save on file selection (de3c32c)

1.15.2 (2024-02-14)

Bug Fixes

  • realtime defaults to false (c6fb16c)

1.15.1 (2024-02-13)

Bug Fixes

  • add file.size and add missing object param (32f8508)

1.15.0 (2024-02-05)

Bug Fixes

Features

1.14.2 (2024-01-17)

Bug Fixes

  • await getFilter() (339a343)
  • support defining storage and database in config (bc992c1)
  • update to support new query system (d3d43dc)

1.14.1 (2023-12-28)

Bug Fixes

1.14.0 (2023-11-25)

Bug Fixes

  • update licensing details (8c40ebb)

Features

  • upgrade dependencies for latest features and fixes (d30415b)

1.13.0 (2023-11-25)

Bug Fixes

  • update nav, edit button and css path (b88261d)

Features

  • upgrade dependencies for latest features and fixes (4fb4643)

1.12.0 (2023-11-19)

Features

  • update dependecies for th latest features and bug fixes (309a71a)

1.11.0 (2023-11-12)

Bug Fixes

  • bump dependencies for latest features (c268d0f)

Features

  • symlinks will find realpath to upload (0984755)

1.10.0 (2023-11-09)

Bug Fixes

Features

  • support webmanifest file type (aca211d)

1.9.10 (2023-11-03)

Bug Fixes

  • favicon.ico path (d624243)
  • update dependencies to the lates versions (109bee3)
  • update method to use object.update etc (d412fe0)

1.9.9 (2023-10-25)

Bug Fixes

1.9.8 (2023-10-22)

Bug Fixes

  • base64 conditions (55ef6e3)
  • support watch upload of deeply nested files (db8b460)

1.9.7 (2023-10-19)

Bug Fixes

  • declartion of render functions using object spread (acb3fc5)

1.9.6 (2023-10-17)

Bug Fixes

1.9.5 (2023-10-14)

Bug Fixes

1.9.4 (2023-10-09)

Bug Fixes

1.9.3 (2023-10-09)

Bug Fixes

1.9.2 (2023-10-09)

Bug Fixes

  • bump cocreate dependency versions (1ff6a15)
  • bump dependencies (2ce5dc3)

1.9.1 (2023-10-09)

Bug Fixes

1.9.0 (2023-09-19)

Features

  • Update CoCreate dependencies to their latest versions (90ea9c8)

1.8.0 (2023-09-19)

Features

  • bump dependencies for there latest features (3944081)

1.7.3 (2023-09-19)

Bug Fixes

  • directory, path, pathname (9fdad2d)
  • removed crud.socket.create() as it is handeled automatically duing socket.send (ca012d0)

1.7.2 (2023-09-18)

Bug Fixes

  • Add path and pathname (8dda8ed)
  • Update CoCreate depndencies to latest versions (955f3b2)

1.7.1 (2023-09-17)

Bug Fixes

  • renamed filter to $filter (c8e8390)
  • update broadcast to broadcastSender false (b93ca93)
  • update data.filter to data.$filter, supports data.object.$filter to ad filters per object (7ccb455)

1.7.0 (2023-09-07)

Features

  • support match param. An array of files to match with config. if match found upload or save source (30e6d57)

1.6.3 (2023-08-21)

Bug Fixes

  • remove unused console.log (610fc0b)

1.6.2 (2023-08-21)

Bug Fixes

1.6.1 (2023-08-21)

Bug Fixes

  • if directories or source is undefined (daa2a3a)

1.6.0 (2023-08-21)

Features

  • Update cocreate dependencies for the latest features and bug fixes (2aab571)

1.5.3 (2023-08-21)

Bug Fixes

1.5.2 (2023-08-18)

Bug Fixes

  • typo "@cocreate/Actions" to "@cocreate/actions" (48d98cd)

1.5.1 (2023-08-17)

Bug Fixes

  • typo @cocreate/observer (211cb9a)

1.5.0 (2023-08-17)

Features

  • bump cocreate dependencies for the latest updates and features (746d491)

1.4.0 (2023-08-16)

Bug Fixes

  • add conditional for newConfig.repositiories (3fae340)
  • crud attributes renamed (a379ef5)
  • refactor(client.js): Simplify file selection event listener (eeb34cc)
  • render-array and render-object attributes renamed to render (1b2301f)
  • replace -target -selector (ceb96a7)
  • replaced @cocreate/crud-client with @cocreate/elements (1e012b3)
  • startIndex renamed to index (0f174c9)
  • updated actions callback data object (edeef71)
  • updated fetch-limit to filter-limit (d40bbf7)
  • webpack.config and package.json make use of mode=production instead of process.env (a563c53)

Features

  • actions support finding elements and data using form, selctors, and crud (c5fd048)
  • Add support for multiple files and directories in file input field, ender and edit file data (5c06442)
  • name attribute and variable renamed to key (7c70ed2)
  • Refactor file form actions and add new 'download' action (d593476)
  • Refactor file rendering (47945de)
  • Refactor Import function to import files into the system. (99f48a7)
  • Refactored code to handle duplicate files when selected from multiple input[type="file"] elements. (c965cae)
  • update template_id to render-selector attribute. update filter attributes to filter selector-attributes (897d910)

1.3.11 (2023-06-16)

Bug Fixes

1.3.10 (2023-06-16)

Bug Fixes

  • Refactor repositories object in newConfig to only include necessary keys (9cc2559)

1.3.9 (2023-06-15)

Bug Fixes

1.3.8 (2023-06-15)

Bug Fixes

1.3.7 (2023-06-14)

Bug Fixes

1.3.6 (2023-06-14)

Bug Fixes

1.3.5 (2023-06-14)

Bug Fixes

1.3.4 (2023-06-14)

Bug Fixes

  • add @cocreate/config package (6ae4a9f)

1.3.3 (2023-06-11)

Bug Fixes

1.3.2 (2023-06-11)

Bug Fixes

  • removed mime-types dependency (ad199e8)

1.3.1 (2023-06-11)

Bug Fixes

1.3.0 (2023-06-11)

Features

1.2.13 (2023-06-11)

Bug Fixes

1.2.12 (2023-06-11)

Bug Fixes

1.2.11 (2023-06-11)

Bug Fixes

1.2.10 (2023-06-11)

Bug Fixes

1.2.9 (2023-06-11)

Bug Fixes

1.2.8 (2023-06-11)

Bug Fixes

1.2.7 (2023-06-11)

Bug Fixes

  • @cocreate/cli moved to dependencies (0ff1ff6)

1.2.6 (2023-06-11)

Bug Fixes

1.2.5 (2023-06-11)

Bug Fixes

  • renamed hosts to host. the value can be a string or an array of strings (a427463)

1.2.4 (2023-06-10)

Bug Fixes

1.2.3 (2023-06-10)

Bug Fixes

1.2.2 (2023-06-10)

Bug Fixes

1.2.1 (2023-06-10)

Bug Fixes

  • Refactor authentication & update config file output format (27da6f0)

1.2.0 (2023-06-09)

Bug Fixes

Features

  • client and server functions (af50769)

1.1.0 (2023-06-08)

Features

  • add template_id to fileInput and render selected files using template and placeholders (ca29280)

1.0.0 (2023-06-06)

Features