Upload a file to Cord's file storage for use in other Cord APIs, such as attaching to a message. Because uploading the file contents may take a long time, this works in two steps. First, the file record is created, and then the file is uploaded directly from the browser to the file storage. You can reference the file in other APIs as soon as the first step is complete.
Certain types of files, such as executable code, cannot be uploaded. Trying to do so will generate an error.
Files that are uploaded but never attached to a message will eventually be garbage collected.
A promise that resolves once the file has been allocated an ID by the backend. At that point, it is safe to reference the file in other APIs, though the file may not be fully uploaded to the file storage yet and could still fail. If you want to know when the file upload is fully complete, you can await the uploadPromise property on the return value.