Skip to content

Commit

Permalink
Merge pull request #942 from nextcloud-libraries/fix/icon
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Oct 11, 2023
2 parents f3fd109 + e3fb42b commit 991f720
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/components/UploadPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
:close-after-click="true"
class="upload-picker__menu-entry"
@click="entry.handler(destination, content)">
<template #icon>
<template #icon v-if="entry.iconSvgInline">
<NcIconSvgWrapper :svg="entry.iconSvgInline" />
</template>
{{ entry.displayName }}
Expand Down
6 changes: 3 additions & 3 deletions lib/uploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export class Uploader {
* @param {string} destinationPath the destination path relative to the root folder. e.g. /foo/bar.txt
* @param {File} file the file to upload
*/
upload(destinationPath: string, file: File) {
upload(destinationPath: string, file: File): PCancelable<Upload> {
const destinationFile = `${this.root}/${destinationPath.replace(/^\//, '')}`

logger.debug(`Uploading ${file.name} to ${destinationFile}`)
Expand Down Expand Up @@ -206,7 +206,7 @@ export class Uploader {
.then(() => { upload.uploaded = upload.uploaded + maxChunkSize })
.catch((error) => {
if (!(error instanceof CanceledError)) {
logger.error(`Chunk ${chunk+1} ${bufferStart} - ${bufferEnd} uploading failed`)
logger.error(`Chunk ${chunk + 1} ${bufferStart} - ${bufferEnd} uploading failed`)
upload.status = UploadStatus.FAILED
}
throw error
Expand Down Expand Up @@ -296,7 +296,7 @@ export class Uploader {
this._jobQueue.onIdle()
.then(() => this.reset())
return upload
})
}) as PCancelable<Upload>

return promise
}
Expand Down

0 comments on commit 991f720

Please sign in to comment.