+4
Declined

Access to File Uploads via API

Ivan Baulin 4 years ago in ADAM Core updated by petra.tant 4 years ago 7

Dear ADAM team,

Could you extend API with a possibility to access file uploads (uploaded via Assets > File Uploads > Upload Files...), edit metadata for them and then publish them please?

Our customers want to have a custom page with custom logic (which differs from standard UI: Assets > File Uploads > View Uploads > Make Assets Public) where end users can enter metadata for these new uploads and publish them. The main differences are: predefined classification set selector instead of standard classification selector (since end users do not know all the classifications required), hiding some fields, filling predefined values in the other fields, and this configuration should work for this page only.

Best regards, 
Ivan Baulin

customization

I too have a similar requirement. Could you please help me with this?

Behind the scenes, the multi-file upload functionality in Assets studio works by creating records and classifying them in a hidden classification. You can mimic this behaviour through custom code by creating your own classification, to which you link the new records that are created upon upload from your custom upload studio.

It is highly unlikely that we will ever develop specific API calls to hook into this functionality.

 

@Ida:

By creating your own classification do you mean the guid of the user to which you want to assign the new files to?

@Luc

I'll see if I can explain a bit more in depth how the multifile upload works in ADAM, and hopefully by that answer your question.

In ADAM a hidden root classification is created for the multi-file upload. Let's call it waitingroom_root. This is to keep all the user waiting rooms grouped under one tree.

For each user - the first time he/she uploads a file - a child classification is created e.g. if I upload it might create waitingroom_Ida (depending on rules for naming etc). When I upload a file using the multi-file upload, a new record is created and the file is added to my child classification of the waitingroom_root. The naming convention ADAM uses for the user waiting rooms is indeed the GUID of the user.

If a user needs to transfer a "file" to the waitingroom of another user, the system is actually unlinking from one waitingroom classification and linking to the waitingroom classification of the other user.

When a user makes an uploaded file public/available, the record is unlinked from the waitingroom classification, this is why a record must be linked to another classification before making public. because if not then the record would have been unlinked from all classifications.

This could be expanded with options to have team waiting rooms or using classification mapping to automatically add the right fields depending on the user who uploaded files etc. But of course this is not currently possible in our currently implementation.

If you know the Guid of that hidden classification is it then possible to add it to a record? Or is that completely blocked?

Yes, if you know the GUID of the classification you want to link the record to, you could do so. But you are entering unsupported and untested territory especially if you want to continue using the multi-file upload in Assets.