CURRENT_FILESPEC

CAS Tags
The CURRENT_FILESPEC string tag appears in CONTENT_PART sections of message taglists, for messages being prepared for the SEND_MESSAGE function or messages retrieved from the server with the GET_Q_ENTRIES_INFO function. This tag specifies the current file name and path of an attachment.  The file name and path may be provided as either a UNC (Universal Naming Convention), or a mapped drive letter and full path.  Care must be taken when using UNC paths to ensure that the server has rights to access the file.  The CURRENT_FILESPEC tag is also required when calling GET_FILE_FUNCTION, to specify the name of an attachment that you want to retrieve from the server.

XML Interface:
In the CAS XML Interface, for every CAS function where the CURRENT_FILESPEC or DESTINATION_FILESPEC tag references a local file, the CONTENT_DATA tag is used instead. The CONTENT_DATA tag is included in the XML, and contains the content of the file, encoded in base64. For more information, see Working with Files in the CAS XML Interface.

  Type Max Size Multiple Allowed
String 128 One per CONTENT_PART section

Example #1:
function SendFaxAttachments()
  {
  var Tl, StatusNum;
  
  Tl = CAS.New();
  CAS.AddTag(Tl,"SEND_MESSAGE","");
  CAS.AddTag(Tl,"REGISTERED_NAME",UserName);
  CAS.AddTag(Tl,"REGISTERED_PASSWORD",UserPassword);
  CAS.AddTag(Tl,"TRANSFER_TYPE",0);  // 1= EMAIL, 0=FAX
  CAS.AddTag(Tl,"SUBJECT","Subject");

  Sl = CAS.CreateSection(Tl,"RECEIVER_ADDRESS","555-123-1234");
    CAS.AddTag(Sl,"RECEIVER_NAME","Recipient");
  CAS.CloseSection(Sl);
  
    // Send an ASCII cover message

  Sl = CAS.CreateSection(Tl,"CONTENT_PART",2);
    CAS.AddTag(Sl,"CONTENT_TYPE",1);
    CAS.AddTag(Sl,"CONTENT_DATA","This is my cover text!");
  CAS.CloseSection(Sl);

    // Send a web page by referencing a URL.  The CONTENT_TYPE
    // is set to HTML, but COPY_ATTACHMENT is 0 so the
    // CURRENT_FILESPEC is treated as a URL, not a file name.

  Sl = CAS.CreateSection(Tl,"CONTENT_PART",3);
    CAS.AddTag(Sl,"CONTENT_TYPE",12);
    CAS.AddTag(Sl,"ORIGINAL_FILENAME","anything.html");
    CAS.AddTag(Sl,"CURRENT_FILESPEC", "http://www.faxback.com");
    CAS.AddTag(Sl,"COPY_ATTACHMENT",0);
  CAS.CloseSection(Sl);

    // Send a Word .DOC file

  Sl = CAS.CreateSection(Tl,"CONTENT_PART",3);
    CAS.AddTag(Sl,"CONTENT_TYPE",0);
    CAS.AddTag(Sl,"ORIGINAL_FILENAME","TestFile.doc");
    CAS.AddTag(Sl,"CURRENT_FILESPEC", "c:\\temp\\TestFile.doc");
    CAS.AddTag(Sl,"COPY_ATTACHMENT",1);
  CAS.CloseSection(Sl);

    // Send message on this already open session
  Tl = CAS.Send(cInst,Tl);
  StatusNum = parseInt(CAS.GetTag(Tl,"STATUS_NUM",0));
  CAS.Delete(Tl);
  
  return(StatusNum);
  }

Example #2:
function GetMessageFile( MsgHandle, MsgAttachmentName)
  {
  var Tl;

  Tl = CAS.New();
  CAS.AddTag(Tl,"GET_FILE_FUNCTION","");
  CAS.AddTag(Tl,"REGISTERED_NAME",UserName);
  CAS.AddTag(Tl,"REGISTERED_PASSWORD",UserPassword);
  CAS.AddTag(Tl,"MESSAGE_HANDLE",MsgHandle);
  CAS.AddTag(Tl,"CURRENT_FILESPEC",MsgAttachmentName);
  CAS.AddTag(Tl,"DESTINATION_FILESPEC","c:\\copyhere.tmp");
    // Get file on this already open session
  Tl = CAS.Send(Instance,Tl);
  CAS.Delete(Tl);
  }

See Also:
SEND_MESSAGE, GET_Q_ENTRIES_INFO, GET_FILE_FUNCTION, CONTENT_TYPE, CONTENT_DATA, ORIGINAL_FILENAME, COPY_ATTACHMENT