Clarity Service Management

Expand all | Collapse all

Attach image with the original name

  • 1.  Attach image with the original name

    Posted 03-09-2016 05:33 PM

    Hi community, I am trying to call a image from a contact form, that's already working, at least when I put manually the image on the folder that I using for; well I want to charge the images from the CA SDM attachment functionality, here is the problem, when I upload the image just lost the name because it put a persid_name.png.gz. something like "9E56F44C42D27B479CCA46B5CA9C06DC_default_profile.png.gz"... and from the form I call it like "default_profile.png", of course are thousands of images with a name like id and from the cnt form is imposible know that attach name.



    conclusion: I want to know if I can upload a image in CA SDM without lost the original name, I want to save it in the repository with the same name that was loaded.



    I really appreciate your help,



    Thanks in advance

  • 2.  Re: Attach image with the original name

    Posted 03-10-2016 01:31 AM


    I think there is no need to change generated file name, you can fetch it via PDM_LIST.

    Generally Service Desk attachments have followed attribtes:

    • orig_file_name - original file name;
    • attmnt_name - service desk defined file name (shown in attachments lists);
    • file_name - system generated file name (physical file name);


    Code will look like:

    <PDM_LIST PREFIX=list WHERE="file_name like '$args.userid'" FACTORY=attmnt>

    if (Number($ > 0) alert('$list.attmnt_name');



    BTW: If you plan to call that data frequently, I think that better to perform some actions to link data via SREL, because fetching data from huge factories can cause system lags.




  • 3.  Re: Attach image with the original name

    Posted 03-10-2016 09:56 AM

    hi cdtj,


    Thanks for reply the topic, at the end I think I will do it with PAM, because are so many images and it will take a long time to load the form.


    I will post when I solve it.