あなたは<filename
または@filename
を使用する必要があります。
curl -X POST \
-F 'shape=<myfile.geojson' \
-F 'age=69' \
-o 'reconstructed_myfile.geojson' \
-- 'https://dev.macrostrat.org/reconstruct'
は詳細についてはman curl
を参照してください:
$ man curl | awk '$1 ~ /-F/' RS=
-F, --form <name=content>
(HTTP) This lets curl emulate a filled-in form in which a user has
pressed the submit button. This causes curl to POST data using the
Content-Type multi‐ part/form-data according to RFC 2388. This
enables uploading of binary files etc. To force the 'content' part to
be a file, prefix the file name with an @ sign. To just get the
content part from a file, prefix the file name with the symbol <. The
difference between @ and < is then that @ makes a file get
attached in the post as a file upload, while the < makes a text field
and just get the contents for that text field from a file.
は '<'ここに '@'よりも適切ではないでしょうか? – chepner
はい、 '<'は私にとってより意味があります。残念ながら、私はGeoJSONとして500の内部サービスエラーを返します。これは、Curlビットではなくデータサービス側の問題を示唆するかもしれませんが、データサービスは元の構文を使用してより小さなファイルで動作します。 – Andy