have options for results

pull/1342/head
bunsenstraat 3 years ago committed by davidzagi93@gmail.com
parent 5da6a85c8f
commit f3396c20ea
  1. 4
      apps/remix-ide/src/app/files/dgitProvider.js

@ -363,7 +363,7 @@ class DGitProvider extends Plugin {
data.append('pinataMetadata', metadata) data.append('pinataMetadata', metadata)
const url = 'https://api.pinata.cloud/pinning/pinFileToIPFS' const url = 'https://api.pinata.cloud/pinning/pinFileToIPFS'
try { try {
await axios const result = await axios
.post(url, data, { .post(url, data, {
maxBodyLength: 'Infinity', maxBodyLength: 'Infinity',
headers: { headers: {
@ -373,7 +373,7 @@ class DGitProvider extends Plugin {
} }
}) })
// also commit to remix IPFS for availability after pinning to Pinata // also commit to remix IPFS for availability after pinning to Pinata
return await this.export(this.remixIPFS) return await this.export(this.remixIPFS) || result.data.IpfsHash
} catch (error) { } catch (error) {
throw new Error(error) throw new Error(error)
} }

Loading…
Cancel
Save