Hi Guys,
Hi Guys,
Hi Jenli,
Can you confirm that you're able to upload a file manually?
AJ
Hi AJ,
Thank you for being here for our issue. For your question that I am able to upload to CAD File by using "Select New File" button on Manage file dialog with no problem. Please see the screenshot below.
I also put the default Vault pattern information and VaultServerConfig.xml file that you may need as following below, I am confused about any problems with the settings over there. thanks.
Best regards,
Jen Li
Hi Jen,
Could you please post a segment of the code you're using to attempt to upload files? This will give us better insight into what is actually happening in your environment,
AJ
Hi AJ,
Below is the piece of code of getting specified file we need then upload the file into system.
***********************************************************************************
var item = parent.thisItem;
var NativeFileID = item.getProperty("native_file");
var qry = item.newItem("file", "get");
qry.setAttribute("select", "filename");
qry.setProperty("config_id", NativeFileID);
var res = qry.apply();
var file_name = res.getProperty("filename");
var filePath = "C:\\temp\\" +file_name;
var item1 = item.newItem('File', 'add');
item1.setProperty("filename", file_name);
item1.attachPhysicalFile(filePath);
var item1 = item1.apply();
if (item1.isError())
{
top.aras.AlertError( "error:" + item1.getErrorDetail());
}
else
{
return "Success!";
}
***************************************************************************
Thanks a lot!
Best,Jen
Hi Jen,
The code you've sent is interesting, from a quick glance it looks like you're getting an existing file in the system, then getting it's filename property. You're then using this to create a filepath for your new File Item? Is this correct? Can you verify that whatever file you're trying to upload exists in the location C:/temp/{filename}?
Let me know if I'm misunderstanding the purpose of this code snippet.
AJ
Hi AJ,
Exactly, you get what I am doing through the code. For your concern, I did put a correct file in the location C:/temp/{filename}. However still pop up the vault URL error. Thanks.
Best,Jen
Your use case is strange to me, but I guess that should work. I've got a few more things to test.
Could you isolate only the uploading code? Hard code in a file path which you know exists and verify that you can upload a file using a single use method. Remove anything except the code between the file item declaration and the apply statement.
Could you also ensure that you've got the file you're looking for on your client machine as opposed to the server? If you're running locally this won't be an issue but It's just something that's good to check.
Hey AJ,
As you suggest, I did isolate the uploading code, as the code located at C:\Program Files (x86)\Aras\Innovator\Innovator\Client\scripts\manageFileDialog.html
And there is no luck still pops up the same error, Please see the screenshots below, I also put the alert message for testing purpose for your reference. Thanks for your time AJ!
Best regards,
Jen Li