SPFX how to get file ID? : <p>I am working on a webpart, and I need to filter a folder with files tied to a <strong>list item</strong>, but I am facing multiple problems:</p>

<p>a) I can store the file ID in a lookup field of the list item, but I cannot retrieve the file ID with any available query. </p>

<pre><code>meetingFolderPath.folder.files.get();
</code></pre>

<p>This query gets me a all the files, but none of them contain the lookup ID. They do contain a NAME, UNIQUEID, and URL, all of which is of type string, but I <strong>cannot</strong> store a string in a lookup field in sharepoint. It doesnt even support any list-type fields other than lookup (which takes int or int[]).</p>

<p>b) .expand seemingly does not support a multiple-lookup field</p>

<pre><code> meetingFolderPath.folder.files.expand("Files").get();
</code></pre>

<p>I would assume some of you to suggest this, and maybe Im doing it wrong, but I cannot get it to work. Remember I have lookup field that contains multiple IDs</p>

<p>c) cannot use Attachments.</p>

<p>The req spec specifically says NOT to use attachments, which would have solved my problem, but they need to be able to collab on a file, so its of no use that they have to upload every little iteration of the file. Instead the file should be in a folder, tied to a Team, where they can make as many changes as needed without losing the reference in the list field.</p>

<p>d) custom query does not support get by ID</p>

<pre><code>_api/yada/yada/files('NAME') // WORKS
_api/yada/yada/files(id) // DOESNT WORK
</code></pre>

<p>I tried messing with a custom query, but putting an ID instead of a name returns an error.</p>

<p>At this point, the only solution I see is a complete seperate list containing a list item ID and a filename.. but I really do not want to implement that.</p>
