# File extension missing in received file From Insert from URL container

**URL:** <https://the.fmsoup.org/t/file-extension-missing-in-received-file-from-insert-from-url-container/209>\
**Category:** Questions\
**Created:** [July 8, 2019, 11:53am UTC](https://the.fmsoup.org/t/file-extension-missing-in-received-file-from-insert-from-url-container/209 "2019-07-08T11:53:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincent\_L](https://avatars.discourse-cdn.com/v4/letter/v/b5a626/32.png) [@Vincent\_L](https://the.fmsoup.org/u/Vincent_L)\
**Post date:** [July 8, 2019, 11:53am UTC](https://the.fmsoup.org/t/file-extension-missing-in-received-file-from-insert-from-url-container/209/1 "2019-07-08T11:53:22Z")

</div>

Hi,

I’m trying to upload a file with Insert from URL to a REST Service. But the service receives the file, without the extension in the filename

I used the following syntax for my curl options

"-X " &$method & " -H "Authorization: Bearer "&$token& “” -F “file=@$container” -F “content-type=image”

Where $container is a variable containing the container field

The file is correctly uploaded but without the filename

Did anybody encountered this issue ?

Thanks for your help

P.S : Obvioulsy the file in the container has an extension, ever the GetContainerAttribute(f;“filename”) returns the correct filename with its extension

---

<div class="post-metadata">

**Author:** ![Vincent\_L](https://avatars.discourse-cdn.com/v4/letter/v/b5a626/32.png) [@Vincent\_L](https://the.fmsoup.org/u/Vincent_L)\
**Post date:** [July 8, 2019, 12:37pm UTC](https://the.fmsoup.org/t/file-extension-missing-in-received-file-from-insert-from-url-container/209/2 "2019-07-08T12:37:54Z")

</div>

Ok, found-out the issue thanks to [FileMaker 16: cURL and Container Fields Demo | Soliant Consulting](https://www.soliantconsulting.com/labs/filemaker-16-curl-containers-demo/) demo file

Filemaker send the variable name as the file name ! So you have to name your variable (here “container”), to the actual filename of the file. How convenient…

---

<div class="post-metadata">

**Author:** ![Torsten](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/torsten/32/1574_2.png) [@Torsten](https://the.fmsoup.org/u/Torsten)\
**Post date:** [July 8, 2019, 12:43pm UTC](https://the.fmsoup.org/t/file-extension-missing-in-received-file-from-insert-from-url-container/209/3 "2019-07-08T12:43:23Z")

</div>

The curl documentation specifies the option --F supporting a value ‘filename’.

[curl -F “file=@localfile;filename=nameinpost” example.com](https://curl.haxx.se/docs/manpage.html)
