-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #296 from uploadcare/feat/update-file-uploader
feat(file-uploader): Updated @uploadcare/blocks to @uploadcare/file-u…
- Loading branch information
Showing
16 changed files
with
93 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ Below is the full default configuration: | |
"use_legacy_widget": False, | ||
"use_hosted_assets": True, | ||
"widget": { | ||
"version": "0.36.0", | ||
"version": "1", | ||
"variant": "regular", | ||
"build": "min", | ||
"options": {}, | ||
|
@@ -58,17 +58,22 @@ PyUploadcare takes assets from CDN by default, e.g.: | |
|
||
.. code-block:: html | ||
|
||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@1/web/uc-file-uploader-regular.min.css" | ||
> | ||
|
||
|
||
<script type="module"> | ||
import * as LR from "https://cdn.jsdelivr.net/npm/@uploadcare/[email protected]/web/blocks.min.js"; | ||
LR.registerBlocks(LR); | ||
import * as UC from "https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@1/web/file-uploader.min.js"; | ||
UC.defineComponents(UC); | ||
</script> | ||
|
||
<!-- ... --> | ||
|
||
<lr-file-uploader-inline | ||
css-src="https://cdn.jsdelivr.net/npm/@uploadcare/[email protected]/web/lr-file-uploader-regular.min.css" | ||
<uc-file-uploader-inline | ||
ctx-name="my-uploader" | ||
></lr-file-uploader-inline> | ||
></uc-file-uploader-inline> | ||
|
||
If you don't want to use hosted assets you have to turn off this feature: | ||
|
||
|
@@ -91,9 +96,9 @@ widget url: | |
"widget": { | ||
"override_js_url": "http://path.to/your/blocks.js", | ||
"override_css_url": { | ||
"regular": "http://path.to/your/lr-file-uploader-regular.css", | ||
"inline": "http://path.to/your/lr-file-uploader-inline.css", | ||
"minimal": "http://path.to/your/lr-file-uploader-minimal.css", | ||
"regular": "http://path.to/your/uc-file-uploader-regular.css", | ||
"inline": "http://path.to/your/uc-file-uploader-inline.css", | ||
"minimal": "http://path.to/your/uc-file-uploader-minimal.css", | ||
}, | ||
}, | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.