Skip to content

Commit

Permalink
close #146
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidZhang73 committed Mar 11, 2022
1 parent 29012a4 commit 463a343
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ content-type: application/json

> All the keys and values are **not** case-sensitive.
>
> **Note** if you are using an external URL for `annotation`, `video` or `config`,
> **Note** if you are using an external URL for `annotation`, `video`, `config` or `submitURL`,
> please make sure you are following [Cross-Origin Resource Sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS).
> And they need to be [URL encoded](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI) if there is any special characters.
### `annotation`

Expand Down Expand Up @@ -238,7 +239,7 @@ Whether to show quick popup when finishing annotating an object/region/skeleton.

**Example** `submitURL=http%3A%2F%2Fexample.com%3Ftoken%3D123456`

Note that the submission url needs to be URL encoded.
URL used for submitting annotation.

### Examples

Expand Down
6 changes: 3 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,17 @@ const {
// annotation
if (annotation) {
const { loadAnnotation } = useAnnotation()
utils.readFile(annotation).then(res => {
utils.readFile(decodeURIComponent(annotation)).then(res => {
loadAnnotation(JSON.parse(res))
}).catch(err => {
utils.notify(`Could not load annotation: ${err}`, 'negative')
})
}
if (!annotation && video) {
annotationStore.video.src = video
annotationStore.video.src = decodeURIComponent(video)
}
if (!annotation && config) {
utils.readFile(config).then(res => {
utils.readFile(decodeURIComponent(config)).then(res => {
configurationStore.importConfig(JSON.parse(res))
utils.notify('Config loaded successfully!', 'positive')
}).catch(err => {
Expand Down

0 comments on commit 463a343

Please sign in to comment.