Web3 api 504 Gateway Time-out

request:
curl --request POST
–url https://deep-index.moralis.io/api/v2/ipfs/uploadFolder
–header ‘Content-Type: application/json’
–header ‘X-API-Key: someapikey’
–data ‘[
{
“path”: “test/logo.png”,
“content”: “someimage”
}
]’

got:
504 Gateway Time-out

What was the size of that image?

very small
data:image/jpeg;base64,/9j/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIABQAFAMBIgACEQEDEQH/xAGiAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgsQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+gEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoLEQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/APMfjJ+y1+zf8Nf+CCHws/aP8IfsK+OPFv7QXxg+G3hv4reN/wBtbwTCxvfhPMv7RXgkNJ43m8XfG1PHMfjP4g+Divg94/AltcSPLcZM8CJHG/of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6gD/9k=

Ok, it should work then. Did you try multiple times and got same error?

tried about four times in 10 min timeframe

For me it works fine in web3api interface with given example for upload folder: https://admin.moralis.io/web3Api

  • Preparing request to https://deep-index.moralis.io/api/v2/ipfs/uploadFolder
  • Current time is 2022-04-26T11:45:16.342Z
  • Using default HTTP version
  • Disable timeout
  • Enable automatic URL encoding
  • Enable SSL validation
  • Enable cookie sending with jar of 0 cookies
  • STATE: INIT => CONNECT handle 0x70006cb808; line 1789 (connection #-5000)
  • Too old connection (311 seconds), disconnect it
  • Connection 3 seems to be dead!
  • The cache now contains 0 members
  • Closing connection 3
  • TLSv1.3 (OUT), TLS alert, close notify (256):
  • Added connection 4. The cache now contains 1 members
  • STATE: CONNECT => RESOLVING handle 0x70006cb808; line 1835 (connection #4)
  • family0 == v4, family1 == v6
  • Trying 104.18.16.45:443…
  • STATE: RESOLVING => CONNECTING handle 0x70006cb808; line 1917 (connection #4)
  • Connected to deep-index.moralis.io (104.18.16.45) port 443 (#4)
  • STATE: CONNECTING => PROTOCONNECT handle 0x70006cb808; line 1982 (connection #4)
  • ALPN, offering h2
  • ALPN, offering http/1.1
  • successfully set certificate verify locations:
  • CAfile: /var/folders/tr/gcg3j3z91sl6mbkhkjpzqk7w0000gn/T/insomnia_2022.2.1/ca-certs.pem
  • CApath: none
  • Didn’t find Session ID in cache for host HTTPS://deep-index.moralis.io:443
  • TLSv1.3 (OUT), TLS handshake, Client hello (1):
  • STATE: PROTOCONNECT => PROTOCONNECTING handle 0x70006cb808; line 2000 (connection #4)
  • TLSv1.3 (IN), TLS handshake, Server hello (2):
  • TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
  • TLSv1.3 (IN), TLS handshake, Certificate (11):
  • TLSv1.3 (IN), TLS handshake, CERT verify (15):
  • TLSv1.3 (IN), TLS handshake, Finished (20):
  • TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
  • TLSv1.3 (OUT), TLS handshake, Finished (20):
  • SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
  • ALPN, server accepted to use h2
  • Server certificate:
  • subject: C=US; ST=California; L=San Francisco; O=Cloudflare, Inc.; CN=moralis.io
  • start date: Jan 4 00:00:00 2022 GMT
  • expire date: Jan 3 23:59:59 2023 GMT
  • subjectAltName: host “deep-index.moralis.io” matched cert’s “*.moralis.io”
  • issuer: C=US; O=Cloudflare, Inc.; CN=Cloudflare Inc ECC CA-3
  • SSL certificate verify ok.
  • STATE: PROTOCONNECTING => DO handle 0x70006cb808; line 2019 (connection #4)
  • Using HTTP2, server supports multiplexing
  • Connection state changed (HTTP/2 confirmed)
  • Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
  • Using Stream ID: 1 (easy handle 0x70006cb808)

POST /api/v2/ipfs/uploadFolder HTTP/2
Host: deep-index.moralis.io
user-agent: insomnia/2022.2.1
x-api-key: YNK1oJejsgzJ1L5Gxaszqd1fOH5t5h595ksVu5bvE6nyCDl9Bb7WD7N18Gb6mglz
content-type: application/json
accept: /
content-length: 67

  • STATE: DO => DID handle 0x70006cb808; line 2077 (connection #4)
  • multi changed, check CONNECT_PEND queue!
  • STATE: DID => PERFORMING handle 0x70006cb808; line 2196 (connection #4)

| [
| {
| “path”: “test/logo.png”,
| “content”: “someimage”
| }
| ]

< HTTP/2 504
< date: Tue, 26 Apr 2022 11:46:16 GMT
< content-type: text/html
< cf-cache-status: DYNAMIC
< expect-ct: max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct
< server: cloudflare
< cf-ray: 701f12400959abc2-CPH

  • Received 160 B chunk
  • nread == 0, stream closed, bailing
  • STATE: PERFORMING => DONE handle 0x70006cb808; line 2395 (connection #4)
  • multi_done
  • Connection #4 to host deep-index.moralis.io left intact
  • Expire cleared (transfer 0x70006cb808)

Maybe it is a ssl problem. Can you try with CURL directly?