-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: update ci workflows * feat: add `metadata` and `metadataCallback` settings * chore: sync package lock * chore: format codestyle * chore: add warnings when wrong types are passed * chore: format codestyle * refactor: metadata request object assign * refactor: custom metadata iterator * refactor: metadata iteration
- Loading branch information
Showing
10 changed files
with
443 additions
and
331 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<meta charset="UTF-8" /> | ||
<meta content="width=device-width,initial-scale=1" name="viewport"/> | ||
<script> | ||
UPLOADCARE_PUBLIC_KEY = 'demopublickey' | ||
UPLOADCARE_DEBUG_UPLOADS = true | ||
UPLOADCARE_METADATA = { | ||
globalObject: 'value' | ||
} | ||
UPLOADCARE_METADATA_CALLBACK = () => ({ | ||
globalCallback: 'value' | ||
}) | ||
</script> | ||
<script src="./uploadcare.full.js"></script> | ||
|
||
<p> | ||
Widget: | ||
<input type="hidden" role="uploadcare-uploader" /> | ||
</p> | ||
|
||
<button>open dialog</button> | ||
|
||
<script> | ||
const btn = document.querySelectorAll('button') | ||
|
||
btn[0].addEventListener('click', () => { | ||
uploadcare.openDialog(null, { | ||
metadata: {dialogObject: 'value'}, | ||
metadataCallback: () => ({dialogCallback: 'value'}) | ||
}).done(function(file) { | ||
console.log(file) | ||
}) | ||
}) | ||
</script> |
Oops, something went wrong.