Send a File or URL
Reference documentation on sending files or URLs for processing using Mindee client libraries.
Requirements
You'll need to have your Mindee client configured correctly as described in the Configure the Client section.
Both the Client and the Inference Parameters are required.
Overview
You can send either a local file or an URL to Mindee servers for processing.
The source has no impact on server-side processing nor on the result.
A local file can be manipulated and adjusted before sending, as described in the Adjust the Source File section.
The contents of a URL cannot be manipulated locally. You'll need to download it to the local machine if you wish to adjust the file in any way before sending.
Use a File
You'll need a Local Input Source as described in the Load and Adjust a File section.
Use an URL
You'll need a Remote Input Source as described below.
Requirements
All Accepted Files may be used, if they adhere to the File Limits.
In addition, the source URL must adhere to the following rules:
Secured using TLS (HTTPS).
Publicly available using only the URL, no authentication headers.
Authentication may be provided in the URL as query parameters: username+password or token. For example, Amazon S3 signed URLs will work.
Contents must be a binary file (raw bytes, not base64-encoded).
File contents cannot be encrypted, PDFs must not be password protected.
The Mindee server will not follow redirections (HTTP 3xx).
Initialize the URL
Use the URLInputSource class.
Use the URLInput class.
Use the URLInputSource class.
Use the URLInputSource class.
Use the URLInputSource class.
Send for Processing
There's no difference between sending a file or an URL, both are considered valid Input Sources.
You can send either using polling or webhooks.
Send with Polling
You'll need a valid input source, one of:
a local source created in Load and Adjust a File
a remote source created in Use an URL
The mindee_client and inference_params are created in Configure the Client.
Use the enqueue_and_get_inference method.
The mindeeClient and inferenceParams are created in Configure the Client.
Use the enqueueAndGetInference method:
The $mindeeClient and $inferenceParams are created in Configure the Client.
Use the enqueueAndGetInference method:
The mindee_client and inference_params are created in Configure the Client.
Use the enqueue_and_get_inference method.
The mindeeClient and inferenceParams are created in Configure the Client.
Use the enqueueAndGetInference method:
The mindeeClient and inferenceParams are created in Configure the Client.
Use the EnqueueAndGetInferenceAsync method:
Send with Webhook
You'll need a valid input source, one of:
a local source created in Load and Adjust a File
a remote source created in Use an URL
Make sure your webhook is configured as detailed here: Webhook Configuration.
The mindee_client as created in Initialize the Mindee Client.
The inference_params as created in Webhook Configuration.
Use the enqueue_inference method:
Note: You can use both methods!
First, make sure you've added a webhook ID to the InferenceParameters instance.
Then, call enqueue_and_get_inference .
You'll get the response via polling and webhooks will be used as well.
The mindeeClient as created in Initialize the Mindee Client.
The inferenceParams as created in Webhook Configuration.
Use the enqueueInference method:
Note: You can use both methods!
First, make sure you've added a webhook ID to the InferenceParameters instance.
Then, call enqueueAndGetInference and handle the promise.
You'll get the response via polling and webhooks will be used as well.
The $mindeeClient as created in Initialize the Mindee Client.
The $inferenceParams as created in Webhook Configuration.
Use the enqueueInference method:
Note: You can also use both methods!
First, make sure you've added a webhook ID to the InferenceParameters instance.
Then, call enqueueAndGetInferenceAsync.
You'll get the response via polling and webhooks will be used as well.
The mindee_client as created in Initialize the Mindee Client.
The inference_params as created in Webhook Configuration.
Use the enqueue_inference method:
Note: You can use both methods!
First, make sure you've added a webhook ID to the InferenceParameters instance.
Then, call enqueue_and_get_inference .
You'll get the response via polling and webhooks will be used as well.
The mindeeClient as created in Initialize the Mindee Client.
The inferenceParams as created in Webhook Configuration.
Use the enqueueInference method:
Note: You can use both methods!
First, make sure you've added a webhook ID to the InferenceParameters instance.
Then, call enqueueAndGetInference and handle the promise.
You'll get the response via polling and webhooks will be used as well.
The mindeeClient as created in Initialize the Mindee Client.
The inferenceParams as created in Webhook Configuration.
Use EnqueueInferenceAsync method:
Note: You can also use both methods!
First, make sure you've added a webhook ID to the InferenceParameters instance.
Then, call EnqueueAndGetInferenceAsync.
You'll get the response via polling and webhooks will be used as well.
Process the Result
Now that your file or URL has been handled by the Mindee servers, you'll want to process the results and use them in your application.
Head on over to the Process the Response section for details on the next step.
Last updated
Was this helpful?

