Re-use or upload model (file)
In most cases xeoService works with different 3D/IFC models. To start processing client can either upload them directly (using xeoStorage) or re-using existing storage system by providing downloadUrl
(example of an such storage systems are S3, Azure Storage or similar).
Files accessible over network.
When working with xeoServices user does not have to send files, instead they can provide link to existing file as downloadUrl
. See example bellow:
bash
curl --request POST \
--url https://converter.xeovision.io/process \
--header 'Content-Type: application/json' \
--header 'Authorization: <token>' \
--data '{
"type": "ifc-xkt",
"downloadUrl": "https://raw.githubusercontent.com/xeokit/xeokit-sdk/master/assets/models/ifc/Duplex.ifc"
}'
IMPORTANT
In this scenario, user has to ensure that the provided link meets > the following requirements:
- The link is accessible for the Converter Service.
- The link leads directly to the file.
xeoStorage to the rescue
If your existing link doesn’t meet the requirements, consider using xeoStorage to store your files.
xeoStorage is based on object storage principles and offers the following features:
- Presigned Upload Links:
- Generate a presigned upload link for your file.
- This link allows secure and temporary access to upload the model to xeoStorage.
- Presigned Download Links:
- After uploading the file,a presigned download link is generated.
- Users can use this link to securely download the model from xeoStorage.
- Multipart Upload Support:
- xeoStorage supports multipart upload, allowing you to break large files into smaller parts for efficient parallel transfer.
Upload a file
- Prepare an upload
Request
bash
curl --request POST \
--url https://storage.xeovision.io/file \
--header 'Content-Type: application/json' \
--header 'Authorization: <token>' \
--data '{
"name": "File.ifc",
"parts": 1
}'
Response
json
{
"id": "167f9c3c-c6fd-4da5-8c5e-801c450842e8",
"parts": [
{
"uploadUrl": "https://sos-ch-gva-2.exo.io/...",
"partNumber": 1
}
]
}
- Use
uploadUrl
to upload a file
Download file
- Fetch
downloadUrl
Request
bash
curl --request GET \
--url https://storage.xeovision.io/file/ \
--header 'Authorization: Bearer <token>'
Response
json
{
"id": "93b2b695-42ab-4125-b249-f5f5f2741f49",
"name": "File.ifc",
"location": "xeovision-upload-bucket",
"updatedAt": "2024-07-10T10:14:09.580Z",
"createdAt": "2024-07-10T10:14:09.580Z",
"downloadUrl": "https://sos-ch-gva-2.exo.io/..."
}
- Download a file using
downloadUrl
from response