Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.

Commit d6cd142

Browse files
authored
chore: unify the default visibility (#42)
1 parent 3af73a8 commit d6cd142

File tree

6 files changed

+7
-10
lines changed

6 files changed

+7
-10
lines changed

docs/src/components/UploadKit/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const uploadOptions: UploadKitOptions = {
3838
operatorAddress: '0x89A1CC91B642DECbC4789474694C606E0E0c420b',
3939
endpoint: 'https://gnfd-testnet-sp1.bnbchain.org',
4040
},
41-
visibility: 'VISIBILITY_TYPE_PRIVATE',
41+
visibility: 'VISIBILITY_TYPE_PUBLIC_READ',
4242
};
4343

4444
export default function App() {

examples/uploadkit-with-nextjs-rainbowkit/src/app/providers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const wagmiConfig = createConfig({
3232

3333
const uploadOptions: UploadKitOptions = {
3434
client: client,
35-
visibility: 'VISIBILITY_TYPE_PRIVATE',
35+
visibility: 'VISIBILITY_TYPE_PUBLIC_READ',
3636
};
3737

3838
export default function Providers({ children }: { children: React.ReactNode }) {

examples/uploadkit-with-nextjs-walletkit/src/app/providers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const options: WalletKitOptions = {
3333

3434
const uploadOptions: UploadKitOptions = {
3535
client: client,
36-
visibility: 'VISIBILITY_TYPE_PRIVATE',
36+
visibility: 'VISIBILITY_TYPE_PUBLIC_READ',
3737
};
3838

3939
export default function Providers({ children }: { children: React.ReactNode }) {

examples/uploadkit-with-remix-rainbowkit/app/root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const loader: LoaderFunction = () => {
5858

5959
const uploadOptions: UploadKitOptions = {
6060
client: client,
61-
visibility: 'VISIBILITY_TYPE_PRIVATE',
61+
visibility: 'VISIBILITY_TYPE_PUBLIC_READ',
6262
};
6363
export default function App() {
6464
const { ENV } = useLoaderData<LoaderData>();

packages/uploadkit/dev/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const uploadOptions: UploadKitOptions = {
5050
operatorAddress: '0x89A1CC91B642DECbC4789474694C606E0E0c420b',
5151
endpoint: 'https://gnfd-testnet-sp1.bnbchain.org',
5252
},
53-
visibility: 'VISIBILITY_TYPE_PRIVATE',
53+
visibility: 'VISIBILITY_TYPE_PUBLIC_READ',
5454
// onError: console.log,
5555
};
5656

@@ -64,7 +64,7 @@ export default function App() {
6464
<button onClick={() => setMode(nextMode)}>switch to {nextMode}</button>
6565
<div style={{ height: 20 }} />
6666
<WalletKitProvider options={options} mode="light">
67-
<UploadKitProvider options={uploadOptions} mode={mode} debugMode={true}>
67+
<UploadKitProvider options={uploadOptions} mode={mode}>
6868
<WalletKitButton />
6969
<SwitchNetworkModal />
7070
<div style={{ height: 16 }}></div>

packages/uploadkit/src/components/UploadButton/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,13 @@ export const UploadButton = (props: ButtonProps) => {
3030
const { totalFee } = useTotalFee();
3131
const { address, connector } = useAccount();
3232
const {
33-
options: { seedString, sp, visibility, bucketName, onError },
33+
options: { client, seedString, sp, visibility, bucketName, onError },
3434
} = useUploadKitContext();
3535
const { isGnfd, uploadButtonDisabled } = useUploadDisable();
3636
const {
3737
state: { loading },
3838
dispatch,
3939
} = useUpload();
40-
const {
41-
options: { client },
42-
} = useUploadKitContext();
4340
const setLoading = (show: boolean) => {
4441
dispatch({
4542
type: 'SET_IS_LOADING',

0 commit comments

Comments
 (0)