Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export class UmbDropzoneManager extends UmbControllerBase {
}

/**
* @param isAllowed
* @deprecated Not used anymore; this method will be removed in Umbraco 17.
*/
public setIsFoldersAllowed(isAllowed: boolean) {
Expand Down Expand Up @@ -128,7 +127,9 @@ export class UmbDropzoneManager extends UmbControllerBase {
const uploaded = await this.#tempFileManager.uploadOne(item.temporaryFile);

// Update progress
if (uploaded.status === TemporaryFileStatus.SUCCESS) {
if (uploaded.status === TemporaryFileStatus.CANCELLED) {
this.#updateStatus(item, UmbFileDropzoneItemStatus.CANCELLED);
} else if (uploaded.status === TemporaryFileStatus.SUCCESS) {
this.#updateStatus(item, UmbFileDropzoneItemStatus.COMPLETE);
} else {
this.#updateStatus(item, UmbFileDropzoneItemStatus.ERROR);
Expand Down Expand Up @@ -226,7 +227,8 @@ export class UmbDropzoneManager extends UmbControllerBase {

async #handleFile(item: UmbUploadableFile, mediaTypeUnique: string) {
// Upload the file as a temporary file and update progress.
const temporaryFile = await this.#uploadAsTemporaryFile(item);
const temporaryFile = await this.#tempFileManager.uploadOne(item.temporaryFile);

if (temporaryFile.status === TemporaryFileStatus.CANCELLED) {
this.#updateStatus(item, UmbFileDropzoneItemStatus.CANCELLED);
return;
Expand Down Expand Up @@ -257,10 +259,6 @@ export class UmbDropzoneManager extends UmbControllerBase {
}
}

#uploadAsTemporaryFile(item: UmbUploadableFile) {
return this.#tempFileManager.uploadOne(item.temporaryFile);
}

// Media types
async #getMediaTypeOptions(item: UmbUploadableItem): Promise<Array<UmbAllowedMediaTypeModel>> {
// Check the parent which children media types are allowed
Expand Down
Loading
Loading