Repository navigation
fix: add outputs of a multi-output Cloud job by their stored hash #23213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cdb2b42
9283356
d032b1a
24d403e
39a045c
47c4217
f5cd29d
bc72295
0bc0de9
e3c328a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,10 +15,13 @@ import { | |
| getAssetType, | ||
| isGeneratedTempOutput | ||
| } from '@/platform/assets/composables/media/assetMappers' | ||
| import { getOutputAssetMetadata } from '@/platform/assets/schemas/assetMetadataSchema' | ||
| import type { AssetItem } from '@/platform/assets/schemas/assetSchema' | ||
| import { MIME_ASSET_INFO } from '@/platform/assets/schemas/mediaAssetSchema' | ||
| import { getAssetUrlFilename, getOutputSubfolder } from './assetMetadataUtils' | ||
| import { getStoredOutputIdentity } from '@/platform/assets/utils/outputAssetUtil' | ||
| import { | ||
| getAssetStoredFilename, | ||
| getOutputSubfolder | ||
| } from './assetMetadataUtils' | ||
| import { resolvePreviewUrl } from './assetPreviewUtil' | ||
| import { getAssetFileUrl } from './assetUrlUtil' | ||
| import { parseUrl } from '@/utils/urlSafety' | ||
|
|
@@ -76,24 +79,13 @@ export function startAssetDrag( | |
| const { dataTransfer } = event | ||
| if (!dataTransfer) return | ||
|
|
||
| const output = getOutputAssetMetadata(asset.user_metadata)?.allOutputs?.[0] | ||
| const storedHash = asset.hash ?? getStoredOutputIdentity(asset)?.hash | ||
| const assetInfo = { | ||
| ...(output?.filename | ||
| ? { | ||
| filename: output.filename, | ||
| subfolder: output.subfolder, | ||
| type: output.type, | ||
| display_name: output.display_name | ||
| } | ||
| : { | ||
| filename: asset.name, | ||
| subfolder: getOutputSubfolder(asset), | ||
| type: isGeneratedTempOutput(asset) | ||
| ? 'temp' | ||
| : getAssetType(asset.tags), | ||
| display_name: asset.display_name ?? undefined | ||
| }), | ||
| attachment_ref: getAssetUrlFilename(asset), | ||
| filename: getAssetStoredFilename(asset, storedHash), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue: [CONFIRMED from existing CI] This changes Cloud drag values to stored hashes, but the browser regressions still expect human filenames. Current Cloud shard 4 fails seven cases in
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, confirmed. The writes are right and the expectations were stale: Cloud |
||
| subfolder: getOutputSubfolder(asset), | ||
| type: isGeneratedTempOutput(asset) ? 'temp' : getAssetType(asset.tags), | ||
|
jaeone94 marked this conversation as resolved.
Resolved
|
||
| display_name: asset.display_name || asset.name, | ||
|
jaeone94 marked this conversation as resolved.
Resolved
|
||
| attachment_ref: storedHash ?? asset.name, | ||
| ...assetMediaSources(asset) | ||
| } | ||
| dataTransfer.setData(MIME_ASSET_INFO, JSON.stringify(assetInfo)) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.