[Skip to main content](#vessel-content)

#   Restrict upload size in total

##

- **[snarf-eu](/forum/user/29142-snarf-eu "View snarf-eu's Profile")**
- [![snarf-eu's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/29142-snarf-eu "View snarf-eu's Profile") Topic Author
- [ Offline](/forum/user/29142-snarf-eu)

Less More

- Posts: 11
- Thank you received: 0
-
-

11 years 10 months ago [\#182749](#182749) by [snarf-eu](/forum/user/29142-snarf-eu "View snarf-eu's Profile")  *[Restrict upload size in total](/forum/32-content-creation/873538-restrict-upload-size-in-total#182749 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : Chrome 38.0.2125.111 m, Firefox 33.1.1  Hello,  I have an issue regarding the upload size of the files. Users can upload files with a maximum of 96mb. The problem is they can upload e.g. 10 files of 96mb in the same session/product. The result is that the upload folder contains too many files. Is it possible to restrict it somehow to 96mb in total?")* was created by *[snarf-eu](/forum/user/29142-snarf-eu "View snarf-eu's Profile")*

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : Chrome 38.0.2125.111 m, Firefox 33.1.1

Hello,

I have an issue regarding the upload size of the files. Users can upload files with a maximum of 96mb. The problem is they can upload e.g. 10 files of 96mb in the same session/product. The result is that the upload folder contains too many files. Is it possible to restrict it somehow to 96mb in total?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODczNTM4LXJlc3RyaWN0LXVwbG9hZC1zaXplLWluLXRvdGFsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 10 months ago [\#182767](#182767) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Restrict upload size in total](/forum/32-content-creation/873538-restrict-upload-size-in-total#182767 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : Chrome 38.0.2125.111 m, Firefox 33.1.1  Hello,  I have an issue regarding the upload size of the files. Users can upload files with a maximum of 96mb. The problem is they can upload e.g. 10 files of 96mb in the same session/product. The result is that the upload folder contains too many files. Is it possible to restrict it somehow to 96mb in total?")*

Hi,

You can change the MAX_POST_SIZE value in your php.ini file.
That can potentially be forced in the .htaccess file.

This is more a server issue than an HikaShop one ![;)](/media/kunena/emoticons/11.png ";)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODczNTM4LXJlc3RyaWN0LXVwbG9hZC1zaXplLWluLXRvdGFsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[snarf-eu](/forum/user/29142-snarf-eu "View snarf-eu's Profile")**
- [![snarf-eu's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/29142-snarf-eu "View snarf-eu's Profile") Topic Author
- [ Offline](/forum/user/29142-snarf-eu)

Less More

- Posts: 11
- Thank you received: 0
-
-

11 years 10 months ago [\#182852](#182852) by [snarf-eu](/forum/user/29142-snarf-eu "View snarf-eu's Profile")  Replied by *[snarf-eu](/forum/user/29142-snarf-eu "View snarf-eu's Profile")* on topic *[Restrict upload size in total](/forum/32-content-creation/873538-restrict-upload-size-in-total#182852 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : Chrome 38.0.2125.111 m, Firefox 33.1.1  Hello,  I have an issue regarding the upload size of the files. Users can upload files with a maximum of 96mb. The problem is they can upload e.g. 10 files of 96mb in the same session/product. The result is that the upload folder contains too many files. Is it possible to restrict it somehow to 96mb in total?")*

Hello,

My webhost won't let users access php.ini. I've asked the helpdesk. I also tried to force MAX_POST_SIZE with .htaccess, but that is also not supported by the webhost.

I was wondering if there is a way in hikashop/market to arrange this.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODczNTM4LXJlc3RyaWN0LXVwbG9hZC1zaXplLWluLXRvdGFsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Away](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 10 months ago [\#182888](#182888) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Restrict upload size in total](/forum/32-content-creation/873538-restrict-upload-size-in-total#182888 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : Chrome 38.0.2125.111 m, Firefox 33.1.1  Hello,  I have an issue regarding the upload size of the files. Users can upload files with a maximum of 96mb. The problem is they can upload e.g. 10 files of 96mb in the same session/product. The result is that the upload folder contains too many files. Is it possible to restrict it somehow to 96mb in total?")*

Hi,

Which type of custom field are you using exactly ?
Depending the kind (classical or ajax) some things might be possible ; but it could require some extra development in order to create this special restriction (and having a appropriate file structure).

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODczNTM4LXJlc3RyaWN0LXVwbG9hZC1zaXplLWluLXRvdGFsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[snarf-eu](/forum/user/29142-snarf-eu "View snarf-eu's Profile")**
- [![snarf-eu's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/29142-snarf-eu "View snarf-eu's Profile") Topic Author
- [ Offline](/forum/user/29142-snarf-eu)

Less More

- Posts: 11
- Thank you received: 0
-
-

11 years 10 months ago [\#183299](#183299) by [snarf-eu](/forum/user/29142-snarf-eu "View snarf-eu's Profile")  Replied by *[snarf-eu](/forum/user/29142-snarf-eu "View snarf-eu's Profile")* on topic *[Restrict upload size in total](/forum/32-content-creation/873538-restrict-upload-size-in-total#183299 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : Chrome 38.0.2125.111 m, Firefox 33.1.1  Hello,  I have an issue regarding the upload size of the files. Users can upload files with a maximum of 96mb. The problem is they can upload e.g. 10 files of 96mb in the same session/product. The result is that the upload folder contains too many files. Is it possible to restrict it somehow to 96mb in total?")*

Hello Guys,

I think i'm using Ajax (see picture) otherwise there wouldn't be a progress bar at the bottom, right?

- [ ![upload.jpg](/forum/attachment/21240) ](/forum/attachment/21240 "upload.jpg") [ ](/forum/attachment/21240?download=1 "upload.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODczNTM4LXJlc3RyaWN0LXVwbG9hZC1zaXplLWluLXRvdGFsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Away](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 10 months ago [\#183366](#183366) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Restrict upload size in total](/forum/32-content-creation/873538-restrict-upload-size-in-total#183366 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : Chrome 38.0.2125.111 m, Firefox 33.1.1  Hello,  I have an issue regarding the upload size of the files. Users can upload files with a maximum of 96mb. The problem is they can upload e.g. 10 files of 96mb in the same session/product. The result is that the upload folder contains too many files. Is it possible to restrict it somehow to 96mb in total?")*

Hi,

Yes you're using the ajax mode.
It means that the files are not upload in the same time but the interesting thing is that you can change dynamically the destination folder during the upload (and also refuse an upload if the destination folder is too big).

HikaMarket already use such kind of rules for the vendors (to change the destination folder ; there is no folder limitation for the moment but it's planned).

The idea is to have a specific folder for each user, so it requires that the users are log-in ; otherwise the guest accounts would all have the same folder and it will be problematic.
All the upload in the front-end is manage by the "upload controller" (components/com_hikashop/controllers/upload.php) and this controller can call the "base controller" in order to have some details about the current uploading.
In HikaShop, the item/order custom fields are managed by the controller order.

You'll find two functions in the order controller : "getUploadSetting" and "manageUpload".
The first one is to get the upload rules (like the upload destination folder) and the second one is to manage the uploaded file after his upload.
In your case, I think the best is to change the upload destination folder Code:

$options = array( 'upload_dir' =&gt; $config-&gt;get('uploadsecurefolder') );

to use a sub directory depending the current user id.
And you can also check the size of the folder and return a "false" if this folder is too big.

Hope my explanations are clear enough and will help you.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODczNTM4LXJlc3RyaWN0LXVwbG9hZC1zaXplLWluLXRvdGFsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.131 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
