Skip to content

Commit 2abab87

Browse files
committed
修复可能存在的问题
1 parent 1c451ae commit 2abab87

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/containers/library-item.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class LibraryItem extends React.PureComponent {
139139
render () {
140140
const iconMd5 = this.curIconMd5();
141141
const iconURL = iconMd5 ?
142-
`${process.env.ZEROCAT_ASSETS}/${iconMd5}` :
142+
`${process.env.ZEROCAT_ASSETS}/${iconMd5.slice(0, 2)}/${iconMd5.slice(2, 4)}/${iconMd5}` :
143143
this.props.iconRawURL;
144144
return (
145145
<LibraryItemComponent

src/lib/storage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class Storage extends ScratchStorage {
6464
// assetId as part of the create URI. So, force the method to POST.
6565
// Then when storage finds this config to use for the "update", still POSTs
6666
method: 'post',
67-
url: `${this.assetHost}/${asset.assetId}.${asset.dataFormat}`,
67+
url: `${this.assetHost}/${asset.assetId.slice(0, 2)}/${asset.assetId.slice(2, 4)}/${asset.assetId}.${asset.dataFormat}`,
6868
withCredentials: true
6969
};
7070
}

0 commit comments

Comments
 (0)