당신은 <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