[FIX] web_editor: image name
Add the image name when the image is uploaded. Complement of commits886c07dabband152e3f8686opw-1880472
This commit is contained in:
committed by
Nicolas Martinelli
parent
c3812c8e62
commit
88a5d9a000
@@ -286,7 +286,7 @@ var ImageDialog = Widget.extend({
|
||||
$form.find('.well > span').remove();
|
||||
$form.find('.well > div').show();
|
||||
_.each(attachments, function (record) {
|
||||
record.src = record.url || '/web/image/' + record.id;
|
||||
record.src = record.url || _.str.sprintf('/web/image/%s/%s', record.id, encodeURI(record.name)); // Name is added for SEO purposes
|
||||
record.is_document = !(/gif|jpe|jpg|png/.test(record.mimetype));
|
||||
});
|
||||
if (error || !attachments.length) {
|
||||
|
||||
Reference in New Issue
Block a user