Site replicated, but images won't download on copy site

Hi folks,

I’ve done an exact copy of a working site that is able to verify epicollect api details and download images to the site. The issue is the copy site won’t download images and I don’t know why as all the code is the same.

Sometimes api’s have the site url hardcoded in somewhere but I can’t find that? basically the site copy is qld.seedtreemaps.com which is an exact copy of seedtreemaps.com

I have no idea why images aren’t downloading on the new site so any guidance on how to fix would be greatly appreciated! As stated image downloads are working fine using same api key, secret and app ID on the original site.

Does epicollect api only work with one site? What could be causing this issue?

Thanks,

Kias

Without knowing the specific architecture or having access to the code base, it’s challenging to diagnose the problem accurately. However, here are a few suggestions that might help you troubleshoot the issue:

  1. API Restrictions: Some APIs might have restrictions on which domains can access their resources. Check the Epicollect API documentation or your API key settings to ensure that qld.seedtreemaps.com is authorized to make requests.
  2. CORS Policies: Ensure that there are no CORS (Cross-Origin Resource Sharing) issues. Sometimes, APIs enforce strict CORS policies, which can prevent resources from being accessed by unauthorized domains.
  3. Error Logging: Implement detailed error logging on the new site to capture any error messages or status codes returned by the API. This information can be crucial in identifying what might be going wrong.
  4. URL Hardcoding: Double-check the code for any hardcoded URLs or references to the original site. It’s possible that there are some URLs or paths that still point to seedtreemaps.com instead of qld.seedtreemaps.com.
  5. API Rate Limits: Ensure that you’re not hitting any rate limits imposed by the API. Since both sites are using the same API key, simultaneous requests from both sites could potentially exceed rate limits.
  6. Configuration Files: Verify all configuration files to ensure that they have been updated correctly for the new site. This includes checking for any environment variables, API keys, secrets, and endpoint URLs.
  7. Network Requests: Use browser developer tools or a network monitoring tool to inspect the network requests made by qld.seedtreemaps.com. Compare them with the requests made by seedtreemaps.com to see if there are any differences in the headers, URLs, or payloads.
  8. Documentation: Refer to the Epicollect API documentation for any specific requirements or settings that need to be configured for a new domain.

If the original site is functioning correctly and downloading images without issues, it might be more efficient to use it as the primary source for downloading images and then synchronize those images with the new site.
This approach could save resources and avoid unnecessary stress on our systems.