style

Breadcrumb

 

Introduction

File & Image Uploader Pro allows you to define your own renaming function that will be executed on the client-side, during upload.

 

Parameter Example

The following code will return a filename based on the timestamp and the original filename and will change the file extension to jpeg. This is needed while converting and compressing files.

function (file) { let newName = new Date().getTime() + '_' + file.name.substr(0, file.name.lastIndexOf('.'))+'.jpeg'; return newName; }
 

Try it

Rename Image

Verify