diff --git a/lib/actions/upload-actions.js b/lib/actions/upload-actions.js --- a/lib/actions/upload-actions.js +++ b/lib/actions/upload-actions.js @@ -8,6 +8,7 @@ import type { CallSingleKeyserverEndpoint } from '../keyserver-conn/call-single-keyserver-endpoint.js'; import { extractKeyserverIDFromID } from '../keyserver-conn/keyserver-call-utils.js'; import type { CallKeyserverEndpoint } from '../keyserver-conn/keyserver-conn-types.js'; +import { type UploadBlob } from '../keyserver-conn/upload-blob.js'; import { IdentityClientContext } from '../shared/identity-client-context.js'; import type { AuthMetadata } from '../shared/identity-client-context.js'; import type { UploadMultimediaResult, Dimensions } from '../types/media-types'; @@ -23,7 +24,6 @@ handleHTTPResponseError, createDefaultHTTPRequestHeaders, } from '../utils/services-utils.js'; -import { type UploadBlob } from '../utils/upload-blob.js'; export type MultimediaUploadCallbacks = Partial<{ +onProgress: (percent: number) => void, diff --git a/lib/keyserver-conn/call-single-keyserver-endpoint.js b/lib/keyserver-conn/call-single-keyserver-endpoint.js --- a/lib/keyserver-conn/call-single-keyserver-endpoint.js +++ b/lib/keyserver-conn/call-single-keyserver-endpoint.js @@ -2,6 +2,7 @@ import _isEqual from 'lodash/fp/isEqual.js'; +import { uploadBlob, type UploadBlob } from './upload-blob.js'; import { updateLastCommunicatedPlatformDetailsActionType } from '../actions/device-actions.js'; import { callSingleKeyserverEndpointTimeout } from '../shared/timeouts.js'; import type { PlatformDetails } from '../types/device-types.js'; @@ -26,7 +27,6 @@ SocketTimeout, } from '../utils/errors.js'; import sleep from '../utils/sleep.js'; -import { uploadBlob, type UploadBlob } from '../utils/upload-blob.js'; export type CallSingleKeyserverEndpointOptions = Partial<{ // null timeout means no timeout, which is the default for uploadBlob diff --git a/lib/utils/upload-blob.js b/lib/keyserver-conn/upload-blob.js rename from lib/utils/upload-blob.js rename to lib/keyserver-conn/upload-blob.js --- a/lib/utils/upload-blob.js +++ b/lib/keyserver-conn/upload-blob.js @@ -3,11 +3,11 @@ import invariant from 'invariant'; import _throttle from 'lodash/throttle.js'; -import { getConfig } from './config.js'; import type { CallSingleKeyserverEndpointOptions, CallSingleKeyserverEndpointResponse, -} from '../keyserver-conn/call-single-keyserver-endpoint.js'; +} from './call-single-keyserver-endpoint.js'; +import { getConfig } from '../utils/config.js'; function uploadBlob( url: string,