Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Upload File to Server with Custom Object

UgurUmutAyberk1
Contributor III

Dear Community,

 

We would like clients to upload files to File Repository using javascript custom object? How could we achive that? What should we do at server side? Is there any library supported by RSA Archer? 

 

Attachment fields are generating new name for each uploaded file. We try to achieve static file name upload so we could initiate File Transporter Datafeed.

 

What is your suggestion? Could we use Ajax, Nodejs on Archer Server or any other Archer compatible technology? 

 

Your answers are much appreciated.

 

Best Regards

8 REPLIES 8

DavidPetty
Archer Employee
Archer Employee

Ugur, are you talking about uploading files outside of Archer?

 

If so, you can use the REST API's to create a session token, upload a file (Base64), and attach that file (file id) to a record using any programing language you prefer.

 Advisory Consultant

UgurUmutAyberk1
Contributor III

Hello David,

 

What we want to achive that;

  • Client will upload file on RSA Archer Security Incident application.
  • Upload file will be created in specific folder on ARCHERSVC server. 
  • Upload file will be saved with static name like "incidents.csv" (Attachment fields are generating ID names which are dynamic)
  • Lastly, we will execute File Transporter Datafeed to create or update content in Archer using source file incidents.csv

 

Do we need any server side job to accomplish that? Could we learn how attachment field is working? Is there any source code available? 

Thanks for the clarification Umut

 

Archer's attachment field type only uploads to the file repository configured in the Archer Control Panel and cannot be changed on an application-by-application basis.  Files that are uploaded are renamed to an id number when stored in the file repository and renamed back when a user downloads the file.

 

You'd have stand up your own web server and corresponding APIs to act as a "middle man".  Then the custom object in the application would upload the field to said web server and then you can proceed what you want to do with the data feed.

 

Sorry, we do not provide source code for Archer.

 Advisory Consultant

UgurUmutAyberk1
Contributor III

David,

 

Is there anyway to manipulate uploaded files in File Repository using Custom Object?

 

Archer will create this file in File Repository as 1000.csv. 

Using custom object, we will read last added file, copy and rename it to securityincidents.csv.

Nope.  All that is handled server side and no way to intervene in that process.

 

If the browser had the ability to see the files in the File Repository and have the ability to rename/copy files, that would be a massive vulnerability

 Advisory Consultant

Archer's Platform API would let you retrieve the original filename (e.g. my_file.csv as opposed to 1000.csv) and the binary contents of said file as a base64 string by calling the  /platformapi/core/content/attachment/nnnn endpoint, where nnnn = the numeric AttachmentID, but as David said, you'd need to save the binary contents as a file on your own server.

Hello Themistocles,

 

Probably we will go with Node.JS on server side. We will try to follow instruction in following link. Uploading a File to server in Node.JS 

 

Could we use library like dropzone.js on custom object? How do we access js libraries on RSA Archer? Should we add our libraries in Company Files? 

 

Best Regads

You can use your own libraries as long as you place them in the location custom object can access it.