Forum

Attach file with AP...
 
Notifications
Retirer tout

Attach file with API

11 Posts
4 Utilisateurs
0 Reactions
3,716 Vu
Rafal
(@rafall92)
Posts: 10
Active Member
Début du sujet
 
[#8322]

Hello
I need to move some of our xml files to projeqtor, But we have a lot of files, so we want to do this via API. Is there any possibility to upload file to PQ with api, and link it to document?


 
Posté : 21/06/2022 10:31 am
(@marylene)
Posts: 592
Membre Admin
 

Hello

You can simply use the "data import" functionality directly in the solution.

Import a document version and use "importfile" to indicate the path of your xml file.
Make sure you have permissions to the PHP server

A little reading here 


 
Posté : 21/06/2022 2:00 pm
Rafal
(@rafall92)
Posts: 10
Active Member
Début du sujet
 

I don't know if you understand me correctly. Lets say I create document in PQ manually, fill fields, and attach some files to it(pictures, database backups, etc.)

I wanna do the same, but using API


 
Posté : 21/06/2022 2:28 pm
(@babynus)
Posts: 14952
Membre Admin
 

You cannot through API.
API only acceps data in JSON, without possibility to attach files.

You can do this through import, as Arkhanje explianed


 
Posté : 22/06/2022 12:38 pm
Rafal
(@rafall92)
Posts: 10
Active Member
Début du sujet
 

Ok. Uploaded files have their own ID. Is it possible to link previously uploaded file to document by their ID?


 
Posté : 22/06/2022 12:42 pm
(@babynus)
Posts: 14952
Membre Admin
 

No, files for document versions are not managed the same way as attachments.


 
Posté : 22/06/2022 2:28 pm
Rafal
(@rafall92)
Posts: 10
Active Member
Début du sujet
 

So if we want multiple documents( in our case Test Cases) we can do that, but if we want to have any attachment to them, we need to do that manually, right?


 
Posté : 22/06/2022 2:49 pm
(@babynus)
Posts: 14952
Membre Admin
 

yes


 
Posté : 23/06/2022 2:18 pm
Sylvain Devidal
(@magicbuzz)
Posts: 38
Trusted Member
 

Is it still impossible to upload a file using API?

You say API only accepts JSON data, but one could encode the document using Base64 and send it in a regular JSON query.

It's not perfect, especially for big files, but this would help a lot.
Base64 encode/decode is a very simple way to store/send binary files as regular text.


 
Posté : 09/12/2025 4:16 pm
(@babynus)
Posts: 14952
Membre Admin
 

Hi,

API is not adapted to this.
We could possibly add this feature is someone agrees to sponsor it.
Don't hesitate to request a quotation if you are interested.


 
Posté : 13/01/2026 1:26 pm
Sylvain Devidal
(@magicbuzz)
Posts: 38
Trusted Member
 

Hello Babynus,

Can you send me a quote by private message or using my profile's email address?

We will chanllenge it with some other solutions we have in mind (doing it ourselves, or upload to a Nextcloud folder then store the link in the ticket).

Kindly regards,
Sylvain


 
Posté : 14/01/2026 6:41 pm
Share:
Retour en haut