# Upload to "File Drop" using curl from command line

**URL:** <https://help.nextcloud.com/t/upload-to-file-drop-using-curl-from-command-line/11893>\
**Category:** ℹ️ Support\
**Created:** [April 27, 2017, 4:55pm UTC](https://help.nextcloud.com/t/upload-to-file-drop-using-curl-from-command-line/11893 "2017-04-27T16:55:34Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![alfred](https://help.nextcloud.com/letter_avatar/alfred/32/5_5575768a8748004e209b776fc1b2916d.png) [@alfred](https://help.nextcloud.com/u/alfred)\
**Post date:** [September 17, 2017, 12:54pm UTC](https://help.nextcloud.com/t/upload-to-file-drop-using-curl-from-command-line/11893/5 "2017-09-17T12:54:26Z")

</div>

Maybe this helps:

> [@Uploading to a public link via a script?](https://help.nextcloud.com/t/uploading-to-a-public-link-via-a-script/20294/5):
>
> I managed to succeed in uploading files through my own custom script by adding the “X-Request-With” header. This makes the final curl command something like: curl -k -T testfile.txt -u "AtAxVrKorgC5YJf:" -H 'X-Requested-With: XMLHttpRequest' https://nextcloud.example.com/public.php/webdav/testfile.txt -u is the parameter for the “Authorization: Basic” header where the username is the final part of the share link created by nextcloud. This makes sure the file gets uploaded to the correct direct…

---

_[View the full topic](https://help.nextcloud.com/t/upload-to-file-drop-using-curl-from-command-line/11893)._
