Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while typing a new aml query #180

Open
MangeshK3007 opened this issue Jun 26, 2017 · 5 comments
Open

Error while typing a new aml query #180

MangeshK3007 opened this issue Jun 26, 2017 · 5 comments

Comments

@MangeshK3007
Copy link

I am trying to add document as item and its related file(actual attachment) but when I click on editor I got nullpointer exception.

Please provide AML query to upload a file.

@rneuber1
Copy link
Contributor

What is your AML?
Did you see https://github.com/erdomke/InnovatorAdmin/wiki/Uploading-and-Downloading-Files ?

\Ralf

@MangeshK3007
Copy link
Author

MangeshK3007 commented Jun 26, 2017

This is AML


<actual_filename>G:\abc.docx</actual_filename>

@MangeshK3007
Copy link
Author

MangeshK3007 commented Jun 26, 2017

I tried which is on this link
https://github.com/erdomke/InnovatorAdmin/wiki/Uploading-and-Downloading-Files ?
still its not working.

@erdomke
Copy link
Owner

erdomke commented Jul 6, 2017

Sorry for the delay. After glancing at the code and some experimentation, it appears that you need to specify a new ID. For example, the AML shown below should work. I updated the wiki to reflect this.

<Item type='File' action='add' id='NEW_GUID_HERE'>
  <actual_filename>C:\Path\To\File.Extension</actual_filename>
</Item>

You can also specify a full structure such as

<Item type='Document File' action='add'>
  <source_id type='Document'>8481D6D585E7419DA5743B1AAC9FFBB9</source_id>
  <related_id>
    <Item type="File" action="add" id='78759E44FE8E48F1AF1D296AEF8E80B9'>
      <actual_filename>C:\Path\To\File.Extension</actual_filename>
    </Item>
  </related_id>
</Item>

Yet another option when creating a structure is to use the Intellisense to select the file using a browse dialog

uploadintellisense

If these options are still not working for you, let me know.

@MangeshK3007
Copy link
Author

Thanks, It Works,
But every Time do I need to give a ID?
can ID be automatically generate, instead of providing by us?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants