Changin the name of download

Posted almost 8 years ago by Bruno Bermejo Almagro

Post a topic
Answered
Bruno Bermejo Almagro
Bruno Bermejo Almagro

Can I change the final name of the archive to download for.
Actually all png download with the name of Product.png.

 

0 Votes

D

Deleted Agent posted almost 8 years ago Best Answer

Sorry that is currently not possible or at least only after the download.

0 Votes


2 Comments

Sorted by
d

diank123 posted over 6 years ago

Hi Bruno Bermejo Almagro,

Is possible. I change name with date time.

Here is code for FancyProductDesigner-all.js around line 6505

     

fpdInstance.getProductDataURL(function(dataURL) {
// add this
var d = new Date();
var currTime = d.getFullYear() + '-' + d.getMonth() + '-' + d.getDate() + '-' + d.getHours() + '-' + d.getMinutes() + '-' + d.getMilliseconds();

fpdInstance.$container.find('.fpd-download-anchor').attr('href', dataURL)
	.attr('download', currTime + '.' + type + '')[0].click();

    And final result is (example)  2017-10-9-11-34-906.png

0 Votes

D

Deleted Agent posted almost 8 years ago Answer

Sorry that is currently not possible or at least only after the download.

0 Votes

Login or Sign up to post a comment