Start a new topic

Long URLs a problem for adding targets to collections?

Long URLs a problem for adding targets to collections?



I'm trying to add an image to a collection from Google Storage.  Since the image is not publicly accessible from Cloud Storage, I can't link to it directly.  Instead, I make the GCS API call to generate a signed URL (which expires after a short while) and send that to Wikitude.  Unfortunately, Wikitude doesn't seem to handle it properly:


$ curl -v -H 'Content-Type: application/json' -H 'X-Version: 3' -H 'X-Token: my-manager-token' -d '{"imageUrl": "", "name": "corridor"}'
* Trying
* Connected to ( port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate: *
* Server certificate: thawte SSL CA - G2
* Server certificate: thawte Primary Root CA
> POST /cloudrecognition/targetCollection/my-collection-id/target HTTP/1.1
> Host:
> User-Agent: curl/7.43.0
> Accept: */*
> Content-Type: application/json
> X-Version: 3
> X-Token: my-manager-token
> Content-Length: 601
* upload completely sent off: 601 out of 601 bytes
< HTTP/1.1 502 Proxy Error
< Date: Wed, 11 May 2016 15:25:23 GMT
< Server: Apache/2.4.7 (Ubuntu)
< Access-Control-Allow-Headers: X-Requested-With, Origin, Client-Security-Token, Accept-Encoding, Content-Type, Authorization, Accept, X-Version, X-Api-Token, X-Token, X-Horizontal-FOV, X-Requested-Authentication-Strategy, Location, X-HTTP-Method-Override
< Access-Control-Expose-Headers: Location, X-Authenticated-Account
< Access-Control-Allow-Methods: PUT, GET, POST, DELETE, OPTIONS
< Access-Control-Allow-Credentials: true
< Cache-Control: no-store
< Content-Length: 595
< Content-Type: text/html; charset=iso-8859-1
<title>502 Proxy Error</title>
<h1>Proxy Error</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
The proxy server could not handle the request <em><a href="/cloudrecognition/targetCollection/my-collection-id/target">POST&nbsp;/cloudrecognition/targetCollection/my-collection-id/target</a></em>.<p>
Reason: <strong>Error reading from remote server</strong></p></p>
<address>Apache/2.4.7 (Ubuntu) Server at Port 443</address>
* Connection #0 to host left intact


(I've obscured the collection id and my token.)


What do you suggest I do?  I can make the same call for public image on Google Cloud Storage just fine (it has a shorter URL -- there's no other difference).  The signed URL for private content is around 560+ bytes; is that too long?






Hi there!
The length of the url shouldn't be an issue but please ensure to solely use publicly available ressources as url-attribute. The asset is downloaded in default way without any special implementation.
You may e.g. first download protected files to a public directory on your server and use this url then as target-upload url.

Best regards
Login or Signup to post a comment