MyBB Community Forums

Full Version: Attachment: a bug and a mod to allow multi-attachment selection
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Sorry, I didn't notice you weren't the one that uploaded your code over to Github (the page where mybb handles the source code) so I assumed your technical knowledge was more than it seems to be (without trying to be rude at all).

Thanks for your contribution, really appreciated.
(2018-04-13, 02:34 AM)Omar G. Wrote: [ -> ]Sorry, I didn't notice you weren't the one that uploaded your code over to Github (the page where mybb handles the source code) so I assumed your technical knowledge was more than it seems to be (without trying to be rude at all).

Thanks for your contribution, really appreciated.

Not taken as rude, but maybe your terminology was not as precise as it could.  My technical knowledge with respect to software design and programming is VERY high.  My "process" knowledge for how an open-source project such as MyBB is managed is minimal.
Oh, I see. The code you submitted needs to fit with the coding standard we (try to) use, so we can proceed with testing and then (if accepted) merge the pull request Eldenroot summited on your behalf.

By taking a look to your code and reading your post I infer it only modifies how the upload behaves if the user selects more than one file, correct ? If so, then we could try to implement a library such as Fine Uploader to update the front end as well so end-user experience can be enhanced more, allowing ajax uploads, drag and drop, in-line validation, and so.

I'd update it myself to do everything at once but I don't know how to update other people pulls, if possible. I have no problem waiting for Eldenroot.

Input from developers would be great of course.
(2018-04-13, 04:58 AM)Omar G Wrote: [ -> ]By taking a look to your code and reading your post I infer it only modifies how the upload behaves if the user selects more than one file, correct ?

Not sure what you meant here.  Clearly if one implments multi-file uploads, part of multi-file uploads includes uploading just a single file.  So yes it does handle that.

But the code is more versatile than that.  Also required to get multi-file downloads is the "input" tag in template "post_attachments_new" must be changed to have name "attachment[]" (braces added) and the keyword "multiple".
<input type="file" name="attachment[]" size="30" class="fileupload" multiple/>


The code in the function works with the original template (supporting only a single attachment) or with the modified template (which allows multi-file).
@Omar G. - feel free to open your PR with code mentioned above, I would like to update and fix my PR but I have a huge issues with GitHub online editor which I use on my Windows machine. We have discussed it with @effone on Discord channel for last 5 days, thank you for that btw buddy! I can send a new PR but not this weekend, need to clean up my fork (too many PRs opened unmerged and I have there a terrible mess in my patches).
I'm willing to give it a try but we need input from the team. They are the ones to decide whatever library or feature is included.

And if accepted, it will probably be for 1.9 or later (the bug should be fixed within 1.8 tho).
Or we can add basic support into 1.8, and add ajax and other cool improvements into 1.9. MyBB devs, what do you think?
If it was me I'd trow it in as soon as it is ready, but thats up to the team really.
I agree, unfortunately no feedback from team, sunny weather during weekend, so maybe we will get the feedback during the next week.
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/3139

Thanks for contributing to MyBB!

Regards,
The MyBB Group
Pages: 1 2 3