新しいBoxサポートサイトへようこそ。 変更点の詳細はこちらをご確認ください .

Issue with retrieving metadata of file

新規投稿

コメント

1件のコメント

  • Ly, Alexander L.

    Seems to be better doing this:

    let metadata = await client.files.getAllMetadata(event.source.id)
    while (metadata.entries.length === 0 || !('topicAreasCovered' in metadata.entries[0])) {
    await new Promise(r => setTimeout(r, 100)) //don't need this, but avoids console spam
    metadata = await client.files.getAllMetadata(event.source.id)
    console.log(metadata)
    }

    but still not a great solution, I think. Does the file get uploaded before metadata is "attached" to the file? It seems strange that the metadata isn't associated immediately, so I'm wondering if it's just a timing, server-side related issue.

    0
    コメントアクション パーマリンク

サインインしてコメントを残してください。