問題タブ [file-system-storage]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
1322 参照

python - 属性エラー: 'str' オブジェクトには属性 'read' がありません python-django

ここでのシナリオは、zipfile を受け取り、それを解凍してメディア ディレクトリに保存するエンドポイントがあるということです。これがそのためのコード全体です

ご覧の通り使っFileSystemStorageています。ZipFile適切に解凍されており、それを見ることができますprint(files)が、問題はFileSystemStorageおそらく保存されていないため、次のエラーが発生します。

私が何を間違えたのか、どうすれば解決できるのか教えてください。ありがとうございました。