{"id":17124603,"url":"https://github.com/asika32764/inline-uploader","last_synced_at":"2025-07-12T21:38:50.547Z","repository":{"id":58230215,"uuid":"52071098","full_name":"asika32764/inline-uploader","owner":"asika32764","description":"A Simple library to support editor image drag \u0026 drop upload which like Github issues.","archived":false,"fork":false,"pushed_at":"2016-04-04T21:14:10.000Z","size":9,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-13T07:11:25.638Z","etag":null,"topics":["ace-editor","code-editor","codemirror","drop-upload","editor","image-upload","upload"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asika32764.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-19T07:54:47.000Z","updated_at":"2022-08-19T18:31:55.000Z","dependencies_parsed_at":"2022-08-31T09:21:47.299Z","dependency_job_id":null,"html_url":"https://github.com/asika32764/inline-uploader","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/asika32764/inline-uploader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asika32764%2Finline-uploader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asika32764%2Finline-uploader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asika32764%2Finline-uploader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asika32764%2Finline-uploader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asika32764","download_url":"https://codeload.github.com/asika32764/inline-uploader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asika32764%2Finline-uploader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265060564,"owners_count":23705231,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ace-editor","code-editor","codemirror","drop-upload","editor","image-upload","upload"],"created_at":"2024-10-14T18:42:59.628Z","updated_at":"2025-07-12T21:38:50.470Z","avatar_url":"https://github.com/asika32764.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inline Uploader\n\nA Simple library to support editor image drag \u0026 drop upload which like Github issues.\n\nThis library is a fork of https://github.com/Rovak/InlineAttachment and add some advanced features.\n\n![img](https://cloud.githubusercontent.com/assets/1639206/13169541/4a07b1a4-d721-11e5-90fb-b616f96c0e4f.gif)\n\n## Installation\n\nUse bower\n\n``` json\nbower install inline-uploader\n```\n\nOr [download](https://github.com/asika32764/inline-uploader/releases) this package and include it.\n\n## Support Editors\n\n- ACE\n- CodeMirror\n\n## How to Use\n\n### ACE Example\n\nYou must include `inline-uploader.js` and `adapter/ace-adapter.js` first.\n\n``` javascript\nvar editor = ace.edit('my-editor');\n\nvar options = {\n    url: 'upload.php'\n};\n\nInlineUploader.init(new InlineUploader.AceAdapter(editor), options);\n```\n\n## Default Options\n\n``` javascript\n{\n    /**\n     * URL to upload the attachment\n     */\n    url: 'upload.php',\n\n    /**\n     * Upload HTTP method used\n     */\n    method: 'POST',\n\n    /**\n     * Request field name where the attachment will be placed in the form data\n     */\n    field: 'file',\n\n    /**\n     * Add the file to the form data before adding the extra parameters\n     * (alternative being to add the file after the extra parameters)\n     */\n    addFileBeforeExtraParameters: true,\n\n    /**\n     * Where is the filename placed in the response\n     */\n    downloadFieldName: 'filename',\n\n    /**\n     * Where is the name placed in the response\n     */\n    downloadLabelName: 'name',\n\n    /**\n     * Allowed types\n     */\n    allowedTypes: [\n        'image/jpeg',\n        'image/png',\n        'image/jpg',\n        'image/gif'\n    ],\n\n    /**\n     * Will be inserted on a drop or paste event\n     */\n    progressText: '![Uploading... {name}]()',\n\n    /**\n     * When a file has successfully been uploaded the last inserted text\n     * will be replaced by the urlText, the {filename} tag will be replaced\n     * by the filename that has been returned by the server\n     */\n    urlText: \"![{name}]({filename})\",\n\n    /**\n     * Text for default error when uploading\n     */\n    errorText: \"Error uploading file\",\n\n    /**\n     * Extra parameters which will be send when uploading a file\n     */\n    extraParams: {},\n\n    /**\n     * Extra headers which will be send when uploading a file\n     */\n    headers: {},\n\n    /**\n     * When a file is received by drag-drop or paste\n     *\n     * @param {Blob}  file\n     * @param {Event} event\n     *\n     * @returns {string} The modified file name as id to replace upload progress text.\n     */\n    onFileReceived: null,\n\n    /**\n     * Custom upload handler\n     *\n     * @param {Blob}   file\n     * @param {string} name\n     */\n    uploadHandler: null,\n\n    /**\n     * Custom error handler. Runs after removing the placeholder text and before the alert().\n     * Return false from this function to prevent the alert dialog.\n     */\n    errorHandler: null,\n\n    /**\n     * Custom response parser\n     *\n     * @param {XMLHttpRequest} xhr\n     *\n     * @returns {Object} containing a parsed version of the response\n     *                   or a false value will default back to parsing the response as JSON\n     */\n    responseParser: null,\n\n    /**\n     * When a file has successfully been uploaded\n     *\n     * @param {Object} data  The data from remote response.\n     * @param {string} name  The file id name to replace progress text.\n     */\n    onFileUploaded: null\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasika32764%2Finline-uploader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasika32764%2Finline-uploader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasika32764%2Finline-uploader/lists"}