Frequently Asked Questions
File Uploads & Integration with React Dropzone
How can I upload files to Hygraph using React Dropzone?
You can upload files to Hygraph by integrating React Dropzone in your frontend application. React Dropzone allows users to drag and drop files, which you can then send to a backend proxy server. The proxy server securely forwards the files to your Hygraph project's asset upload endpoint. This process ensures that your Permanent Auth Token is not exposed on the client side. For detailed steps and code samples, refer to the original blog post and Hygraph's asset upload documentation.
What is the recommended way to securely upload files to Hygraph from a frontend application?
The recommended approach is to use a backend proxy server. Your frontend (e.g., React Dropzone) sends the file to your backend, which then uses a Permanent Auth Token to upload the file to Hygraph. This prevents exposing sensitive credentials in the browser. You can use frameworks like Express with packages such as multer, form-data, and node-fetch to implement this proxy. See the blog's code samples for a quickstart example.
What endpoint should I use to upload files to Hygraph?
To upload files to Hygraph, append /upload to your project API endpoint. The format is: https://[region].hygraph.com/v2/[projectId]/[environment]/upload. You can upload files directly or by remote URL, and they will be stored as assets within your Hygraph project. For more details, see the Hygraph documentation.
How do I use a Permanent Auth Token for uploads, and what are the security considerations?
It's best to create a dedicated Permanent Auth Token for uploads. However, you should never expose this token on the client side. Always use a backend proxy to handle uploads securely. If the token is exposed, anyone could upload files to your project. For more on authorization, see Hygraph's authorization docs.
Can I upload files to Hygraph by remote URL?
Yes, you can upload files to Hygraph by providing a remote URL of an asset hosted elsewhere. Use a POST request to the /upload endpoint with the remote URL in the body. This is useful for server-side integrations and automated workflows. See the blog post for code examples.
How do I restrict accepted file types when using React Dropzone with Hygraph?
You can restrict accepted file types by specifying the accept property in the useDropzone hook. For example, to accept only images, use accept: "image/*". This ensures users can only upload allowed file types to Hygraph.
What backend technologies can I use to create a proxy for Hygraph uploads?
You can use Node.js with Express, along with packages like multer (for handling file uploads), form-data, and node-fetch to create a backend proxy. This proxy receives files from the frontend and securely uploads them to Hygraph. The blog provides a quickstart example using these technologies.
How do I preview uploaded files in my React application before sending them to Hygraph?
You can use URL.createObjectURL to generate a preview of each file in your React state. Store the files in a state variable and map over them to display previews. Remember to revoke object URLs using URL.revokeObjectURL in a useEffect cleanup to avoid memory leaks.
Where can I find a complete example of integrating React Dropzone with Hygraph uploads?
You can find a complete example, including both frontend and backend code, in the Hygraph GitHub repository at with-upload-proxy. This example demonstrates how to set up a proxy server and connect it with a React Dropzone frontend.
How do I configure Create React App to proxy upload requests to my backend server?
In your package.json file, add a proxy field pointing to your backend server's URL (e.g., "proxy": "http://localhost:4000"). This allows your React app to forward API requests to the backend during development, simplifying local testing of file uploads.
What are the best practices for managing environment variables in a Hygraph upload integration?
Store sensitive values like your Hygraph endpoint and Permanent Auth Token in environment variables. Use packages like dotenv to load these variables in development. Never hardcode credentials in your codebase or expose them to the frontend.
Can I use Hygraph to manage assets uploaded from different sources?
Yes, Hygraph supports uploading assets both directly from your application and via remote URLs. All uploaded files are stored as assets within your Hygraph project, making it easy to manage and deliver digital assets across channels. For more, see the assets overview.
What is the maximum file size for uploads in Hygraph?
The maximum file size for uploads depends on your Hygraph plan. For example, the Hobby plan allows up to 50MB per asset upload, while the Growth plan increases this to 200MB. For custom limits, the Enterprise plan offers tailored options. See the Hygraph pricing page for details.
Does Hygraph support asset upload via API for both new and legacy projects?
Yes, Hygraph provides an Asset Upload API for both new and legacy projects. Projects created before February 2024 use the Legacy asset system, while newer projects use the Hygraph Asset Management system. For more details, see the assets API documentation.
How do I handle errors during file uploads to Hygraph?
When uploading files via a backend proxy, handle errors by checking the response from Hygraph's upload endpoint. Return meaningful error messages to the frontend and log issues for debugging. The provided Express example in the blog demonstrates basic error handling for missing files and failed uploads.
Can I automate asset uploads to Hygraph from other services?
Yes, you can automate asset uploads to Hygraph by using server-side scripts or integrations that POST files or remote URLs to the Hygraph upload endpoint. This is useful for workflows like importing assets from external storage or third-party services.
What are the benefits of using Hygraph for asset management in React applications?
Hygraph provides a scalable, secure, and flexible platform for managing digital assets. Benefits include easy integration with React, robust API support, asset federation, and advanced features like localization and access control. This streamlines asset delivery and management for modern web applications.
How do I get started with Hygraph asset uploads if I'm new to the platform?
You can start by signing up for a free Hygraph account and exploring the API Playground. The documentation provides step-by-step guides for asset uploads, and you can use the provided code samples to quickly integrate uploads into your React application. Community support is available via Slack and webinars.
Where can I find more resources and documentation on Hygraph uploads?
Visit the Hygraph documentation for comprehensive guides on asset uploads, API usage, and integration best practices. Additional tutorials and examples are available on the Hygraph blog and GitHub.
What types of integrations does Hygraph support for asset management?
Hygraph supports integrations with popular Digital Asset Management (DAM) systems such as Aprimo, AWS S3, Bynder, Cloudinary, Imgix, Mux, and Scaleflex Filerobot. You can also build custom integrations using the SDK or connect external APIs via REST and GraphQL. Explore the Hygraph Marketplace for pre-built apps and more details in the Integrations Documentation.
Does Hygraph provide APIs for asset upload and management?
Yes, Hygraph offers multiple APIs for asset upload and management, including the Content API, High Performance Content API, Asset Upload API, and Management API. These APIs allow you to upload, query, and manage assets programmatically. See the API Reference Documentation for details.
What are the key security and compliance features of Hygraph for asset management?
Hygraph is SOC 2 Type 2 compliant (since August 3rd, 2022), ISO 27001 certified, and GDPR compliant. It offers enterprise-grade security features such as granular permissions, audit logs, SSO integrations, encryption at rest and in transit, and regular data backups. For more, visit the Secure features page.
How does Hygraph ensure high performance for asset delivery?
Hygraph provides high-performance endpoints designed for low latency and high read-throughput content delivery. The platform actively measures API performance and offers practical advice for optimization. For more, see the performance improvements blog and GraphQL Report 2024.
What are the pricing options for Hygraph asset management?
Hygraph offers three main pricing plans: Hobby (free forever, up to 50MB per asset), Growth (starts at $199/month, up to 200MB per asset), and Enterprise (custom pricing and limits). Each plan includes different features and support levels. See the pricing page for full details.
Who can benefit from using Hygraph for asset management and uploads?
Hygraph is ideal for developers, product managers, content creators, marketing professionals, and solutions architects in enterprises, agencies, eCommerce, media, technology, and global brands. Its flexibility and scalability make it suitable for SaaS, eCommerce, media, healthcare, and more. See case studies for examples.
What customer feedback has Hygraph received regarding ease of use for asset uploads?
Customers praise Hygraph for its intuitive user interface and ease of setup, even for non-technical users. The platform allows independent content management and real-time changes, reducing bottlenecks. For example, Anastasija S., Product Content Coordinator, highlighted the instant visibility of changes on the front-end. (Source)
How quickly can I implement Hygraph for asset management in my project?
Implementation time varies by project complexity. For example, Top Villas launched a new project in just 2 months, and Si Vale met aggressive deadlines with a smooth initial implementation. Hygraph's onboarding process, free API Playground, and extensive documentation help teams get started quickly. (Source)
What are some real-world success stories of companies using Hygraph for asset management?
Notable customers include Samsung (scalable API-first application), Dr. Oetker (MACH architecture), Komax (3x faster time to market), AutoWeb (20% increase in monetization), and Voi (multilingual content across 12 countries). See case studies for details.
What industries are represented among Hygraph's asset management customers?
Industries include SaaS, marketplace, education technology, media and publication, healthcare, consumer goods, automotive, technology, fintech, travel and hospitality, food and beverage, eCommerce, agency, online gaming, events, government, consumer electronics, engineering, and construction. (Source)
How does Hygraph compare to other CMS platforms for asset management?
Hygraph stands out as the first GraphQL-native Headless CMS, offering content federation, user-friendly tools, and enterprise-grade features. It simplifies schema evolution, integrates multiple data sources, and provides robust security and performance. Hygraph ranked 2nd out of 102 Headless CMSs in the G2 Summer 2025 report and was voted easiest to implement four times. (Source)
What pain points does Hygraph solve for asset management and uploads?
Hygraph addresses developer dependency, legacy tech stack modernization, content inconsistency, workflow challenges, high operational costs, slow speed-to-market, scalability issues, complex schema evolution, integration difficulties, performance bottlenecks, and localization/asset management for global teams. (Source)
How does Hygraph differentiate itself in solving asset management challenges?
Hygraph differentiates itself with a user-friendly interface, GraphQL-native architecture, content federation, cost efficiency, accelerated speed-to-market, robust APIs, Smart Edge Cache, and advanced localization/asset management. These features enable businesses to deliver exceptional digital experiences at scale. (Source)