1

さて、Google フォルダ アップロード API ができたので、少しいじってみましたが、大きな欠陥が 1 つあります。

次のような入力がある場合:

<input type="file" id="files" name="files[]" multiple="" webkitdirectory="">

フォルダーをアップロードすることしかできず、単一のファイルをアップロードすることもできません。複数のフォルダが選択されていても、そのフォルダは 1 つしかアップロードできません。ただし、サブフォルダーを意味するわけではありません。それらは問題なくアップロードされます。同じディレクトリまたはまったく異なるディレクトリ内のいくつかの異なるフォルダーを選択してアップロードできるようにしたいと考えています。

これで何か間違っていますか?また、accept 属性を all/* に設定しようとしましたが、うまくいきません。

基本的に、この機能は一貫した機能を実際に許可しないため、私には役に立ちません。非推奨の場合は複数のファイルをアップロードできますが、非推奨でない場合は 1 つのフォルダーのみをアップロードできます。

4

1 に答える 1

2

I agree, the "select folders" feature is pretty much useless for the reasons you have stated. In Fine Uploader a cross-browser upload library I maintain, I decided to not support uploading folders via the select files dialog. Instead, I decided to make use of Chrome's Filesystem API support, which allows you to drop multiple folders and/or files simultaneously. I think allowing users to drop folders and/or files is much more intuitive than what the limited webkitdirectory attribute allows.

于 2013-03-01T03:39:48.723 に答える