dfe30b6d78
## Issue If you make 2 claims from the same source file, the second upload thinks it's trying to resume from the first one. They should be unique uploads. ## Approach Stash the upload url for comparison when looking up existing uploads to resume. Stash that in `params` to minimize code changes. We'll just need to ensure it is cleared before we generate the SDK payload.
77 lines
1.5 KiB
JavaScript
77 lines
1.5 KiB
JavaScript
// @flow
|
|
|
|
declare type UpdatePublishFormData = {
|
|
filePath?: string,
|
|
contentIsFree?: boolean,
|
|
fee?: {
|
|
amount: string,
|
|
currency: string,
|
|
},
|
|
title?: string,
|
|
thumbnail_url?: string,
|
|
uploadThumbnailStatus?: string,
|
|
thumbnailPath?: string,
|
|
thumbnailError?: boolean,
|
|
description?: string,
|
|
language?: string,
|
|
channel?: string,
|
|
channelId?: string,
|
|
name?: string,
|
|
nameError?: string,
|
|
bid?: number,
|
|
bidError?: string,
|
|
otherLicenseDescription?: string,
|
|
licenseUrl?: string,
|
|
licenseType?: string,
|
|
uri?: string,
|
|
nsfw: boolean,
|
|
isMarkdownPost?: boolean,
|
|
};
|
|
|
|
declare type PublishParams = {
|
|
name: ?string,
|
|
bid: ?number,
|
|
filePath?: string,
|
|
description: ?string,
|
|
language: string,
|
|
publishingLicense?: string,
|
|
publishingLicenseUrl?: string,
|
|
thumbnail: ?string,
|
|
channel: string,
|
|
channelId?: string,
|
|
title: string,
|
|
contentIsFree: boolean,
|
|
uri?: string,
|
|
license: ?string,
|
|
licenseUrl: ?string,
|
|
fee?: {
|
|
amount: string,
|
|
currency: string,
|
|
},
|
|
claim: StreamClaim,
|
|
nsfw: boolean,
|
|
tags: Array<Tag>,
|
|
};
|
|
|
|
declare type TusUploader = any;
|
|
|
|
declare type FileUploadSdkParams = {
|
|
file_path: string,
|
|
name: ?string,
|
|
preview?: boolean,
|
|
remote_url?: string,
|
|
thumbnail_url?: string,
|
|
title?: string,
|
|
// Temporary values
|
|
uploadUrl?: string,
|
|
};
|
|
|
|
declare type FileUploadItem = {
|
|
params: FileUploadSdkParams,
|
|
file: File,
|
|
fileFingerprint: string,
|
|
progress: string,
|
|
status?: string,
|
|
uploader?: TusUploader | XMLHttpRequest,
|
|
resumable: boolean,
|
|
};
|