ajax image field opens in browser without saving option

  • Posts: 350
  • Thank you received: 10
  • Hikashop Business
1 month 4 days ago #331520

-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.25
-- PHP version -- : 7.4

Hi,

I use ajax fields for customer image uploads. When I download the images in the backend I always save the image to a downloadfolder. Since the latest versin of Hikashop 4.4.1 the download always opens in the browser instead of having the option to save it. At first I thougt it was a browser issue (always using Chrome), but I tried 2 other browsers (Firefox and Edge) and there I experienced the same problem. The image that opens has the pagename index.php (see screenshot). Could this be a small bug?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 72738
  • Thank you received: 11090
  • MODERATOR
1 month 4 days ago #331521

Hi,

Can you provide a screenshot of the settings of the custom field ?

Please Log in or Create an account to join the conversation.

  • Posts: 350
  • Thank you received: 10
  • Hikashop Business
1 month 3 days ago #331553

Hi,

Sure, see screenshot attached.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 72738
  • Thank you received: 11090
  • MODERATOR
1 month 3 days ago #331558

Hi,

Thanks.

So before the update, you only had the image displayed and it was not clickable. You had to right click on it and select the option to save it.
Now, you still have the image, so you can still right click on it and select the option to save it. And on top of that, you can click on it to get it to open on a new tab in full size.
This change was made following this thread:
www.hikashop.com/forum/4-how-to/900906-u...ages-from-order.html

Please Log in or Create an account to join the conversation.

  • Posts: 350
  • Thank you received: 10
  • Hikashop Business
1 month 1 day ago #331620

Hi Nicolas,

That's not true. It was clickable and I did have the option to save it. I've been doing that for years, so I'm used to it. I downgraded to 4.4.0 and made a screenshot to show you.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 72738
  • Thank you received: 11090
  • MODERATOR
1 month 1 day ago #331624

Hi,

Then why would someone else report that there was no link on it for himself 6 months ago ( www.hikashop.com/forum/4-how-to/900906-u...om-order.html#324529 ) and why did I found a modification from 6 months ago, developed by myself to add that link ( i.imgur.com/6PuKZUw.png ) ?
Anyways, as I said, you can still right click on the image and choose to download it.

Please Log in or Create an account to join the conversation.

  • Posts: 350
  • Thank you received: 10
  • Hikashop Business
1 month 10 hours ago #331648

Hi Nicolas,

I don't know, but I sure know that it worked before? You saw my screenshot didn't you?

Maybe because my upload field is an Ajax file instead of an Ajax image? I'm using Hikashop for 10 years now and it always worked that way since the ajax file upload was an option. Maybe you can try it yourself with a older version of Hikashop?

Please Log in or Create an account to join the conversation.

  • Posts: 72738
  • Thank you received: 11090
  • MODERATOR
4 weeks 12 hours ago #331656

Hi,

Wait, since the beginning of this thread you've been talking about "ajax image" and not "ajax file" (it's even in the subject of the thread...). So all my messages were based on that assuption.
Now you're saying that you're talking about "ajax file", and so all I said here until now is irrelevant.

For "ajax file" custom fields, I don't remember we changed anything about this. And I checked the code and I didn't see any modification about that either.
Note however that how the browser handle the file (opens it or downloads it) depends on how the browser is configured. For example, for FireFox:
support.mozilla.org/en-US/kb/change-fire...redirectlocale=en-US

Please Log in or Create an account to join the conversation.

  • Posts: 350
  • Thank you received: 10
  • Hikashop Business
4 weeks 10 hours ago #331670

Hi Nicolas,

You are right, my apoligies for that. I think I made this mistake because the uploaded files are always images :blush:.

Now for the browser explanation, I thought of that myself, so I first tried 3 different browsers before posting this tread. But in all 3 browsers the file opens in the browser instead of showing an option to save the file. When I downgrade to Hikashop 4.4.0 the save option is back?

Please Log in or Create an account to join the conversation.

  • Posts: 72738
  • Thank you received: 11090
  • MODERATOR
4 weeks 6 hours ago #331673

Hi,

Ok, I looked into it and there was indeed an issue. It was linked to the modifications we made for the "ajax image" type that I was talking about before. It had a side effect of changing the behavior of the "ajax file" download links.
So I've made another patch to fix that.
Download again the HikaShop install package on our website and install it on yours and it will add the patch for that.

The following user(s) said Thank You: michelpouli

Please Log in or Create an account to join the conversation.

  • Posts: 350
  • Thank you received: 10
  • Hikashop Business
3 weeks 6 days ago #331711

Thanks again Nicolas!

Please Log in or Create an account to join the conversation.

Time to create page: 0.084 seconds
Powered by Kunena Forum