The practical Online Convert API is constantly in development for we are striving to add new functionalities for you whenever we can. Thus, we’re always very happy when we can report that something new and practical was added to this file conversion API; just like today!
Now, you can specify a filename for your input file! Of course, the resulting file will have the same filename as well. Let’s find out how this works.
Find out how to test the file conversion API | Video Tutorial
Change The Filename – Online Convert API
In many cases, files come with pre-generated filenames that don’t give away the content of a file. This happens especially when recording with a camera or taking pictures. The files look something like this in these cases:
DSCN_1257, DSCN_1258
IMG_5530, IMG5531
It’s hard to determine what the video or image shows with such a filename. Thus, upon popular request, you are now able to put a custom filename in when converting your file with the online convert API!
Below, we show you the code for your API request that will eliminate the filename confusion for you.
API Post Request
It’s actually quite simple. All you need for your POST request is the “filename” command:
{ "input": [{ "type": "remote", "source": "https://cdn.online-convert.com/example-file/raster%20image/nef/example.nef", "filename": "New File Name" }] }
The code above uses a remote file (uploaded via URL), but you can also upload a file, of course.
Thus, the complete command when, for example, converting a NEF file with a generic filename to JPG, should look as following:
Example: NEF → JPG { "input": [{ "type": "remote", "source": "https://cdn.online-convert.com/example-file/raster%20image/nef/example.nef", "filename": "Product1_front.jpg" }], "conversion": [{ "category": "image", "target": "jpg" }] }
And that’s it. With this command, you can freely choose the filename of your files. Of course, this works for all kinds of files; video, image, e-book, documents, audio, archive.
Follow us