Tagged: mediapress
I am sorry but by post, did you mean activity posting?
I will look into this today. There are some other changes pending for MediaPress, Will be working on that first. Will get back to you tonight/tomorrow.
Hi,
I have looked into it. It is a little bit complex than expected. We need to keep a count in the Activity Uploader instance and check when files are Added ( ‘FilesAdded’ event of plupload) to see if we have already adedd n number of files. We may not check the size of queue as the upload starts as soon as a file is selected.I will need to modify this inside the core to avoid any future issue.
Since you need it by 1st september, I have got 2 days left, I will do my best to have it. I was trying to implement Accept Terms feature for upload and was facing almost identical issue, so please allow me to target in the core itself.
Hi Again,
I have pushed a change in may last commit that will allow you to restrict the number of uploads.Please this
https://github.com/buddydev/mediapress/commit/93f6f36842ab32ae160943db286410604d181295And here is an implementation of it(code is commented)
https://github.com/buddydev/mediapress/blob/master/assets/js/mpp.js#L127
You can check the size of the queue using
up.files.length
hope that gives you enough to work with it.
Hello Brajesh
That is it, works perfect.
There is just one small issue. I restricted upload to 3 photos. When I try to restrict upload to 4 photos, I fire a message with limit of photos and after that I try to upload 3 photos but queue length is 7 (4+3) instead of 3 and upload doesn’t start. I temporarily “bypassed” this issue with page reload the page and with that I reset the queue. 🙂
Hi,
Thank you for the reply and confirming.Another way to deal with it is to reset the queue using plupload API.
The ‘up’ object is an instance of plupload Uploader, so we can use all its methods there.Here is the link to their API.
http://www.plupload.com/docs/Uploader
Hope that helps.
PS: I will be away for around 10 hours and my apologies in advance for any delay in reply.
The topic ‘ [Resolved] Max number of photos per one post’ is closed to new replies.