mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-12 16:26:07 -06:00
fixed renamed image for uploadded image
This commit is contained in:
parent
9b8451389d
commit
4b5e3288aa
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
@ -1,7 +1,7 @@
|
||||
{% if app.request.get('user') != null or app.request.get('user') != "" %}
|
||||
|
||||
{% if userProfile.adv_listing_banner.url == '' %}
|
||||
{% set background_user = img('visiosoft.module.advs::images/1.png').url %}
|
||||
{% set background_user = img('visiosoft.module.advs::images/user_section_back.png').url %}
|
||||
{% else %}
|
||||
{% set background_user = userProfile.adv_listing_banner.url %}
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ $(function () {
|
||||
formData.append('folder', element.data('folder'));
|
||||
},
|
||||
renameFile: function (file) {
|
||||
let newName = new Date().getTime() + '_' + adv_id;
|
||||
let newName = new Date().getTime() + '_' + adv_id + "_" + file.name;
|
||||
return newName;
|
||||
},
|
||||
accept: function (file, done) {
|
||||
@ -116,8 +116,7 @@ $('a[data-action="rotate-image"]').click(function(){
|
||||
data: {img_url: img},
|
||||
url: '/image/rotate',
|
||||
success: function (response) {
|
||||
if(response.status == "success")
|
||||
{
|
||||
if (response.status == "success") {
|
||||
hideLoader()
|
||||
var newURL = updateQueryStringParameter(img, 't', Math.floor(Math.random() * 100000000));
|
||||
event.attr('src', newURL);
|
||||
@ -146,8 +145,7 @@ function updateQueryStringParameter(uri, key, value) {
|
||||
var separator = uri.indexOf('?') !== -1 ? "&" : "?";
|
||||
if (uri.match(re)) {
|
||||
return uri.replace(re, '$1' + key + "=" + value + '$2');
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return uri + separator + key + "=" + value;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user