[Plugin] Improved attachments upload

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
[Plugin] Re: Improved attachments upload
« Reply #30, on March 10th, 2013, 08:13 AM »
And fixed (lightly tested, didn't do a cross browser test), also merged the changes Nao did in Plugin repository
Quote from live627 on March 10th, 2013, 12:18 AM
Quote from Arantor on March 9th, 2013, 11:53 PM
Sure I remember that. I'm still convinced it's ultimately not a blocker for it being a core feature, but simply that the selector is not as selective as it should be about grabbing events.
If only drag events let us see if any files are being dragged, then such would be easier.
You can, actually (see my commit above), it's slightly more awkward since you can't directly access files object while the element is being dragged.
The way it's meant to be

Nao

  • Dadman with a boy
  • Posts: 16,082
[Plugin] Re: Improved attachments upload
« Reply #31, on March 11th, 2013, 04:49 PM »
Quote from Dragooon on March 9th, 2013, 09:46 AM
Quote from Plugin revs
Dragooon, I'm still waiting for your approval to change the author ID to Wedgeward
Nobody told me about this?
I mentioned it in another topic...
Well, the plugin isn't "public" yet, so I didn't bother to ask you too much.
Quote from Dragooon on March 9th, 2013, 09:46 AM
I didn't even know there was an alternative copy of this plugin in Wedge's plugin repository :P.
I renamed it several times.
Quote from Dragooon on March 9th, 2013, 09:46 AM
I don't mind the author ID change, but there has to be a better way to maintain the repository. Can't it be some sort of svn:external with the master in my GitHub account?
I wouldn't know how to use externals or whatever... :^^;:
Posted: March 11th, 2013, 04:49 PM
Quote from live627 on March 9th, 2013, 11:47 PM
Remember the bug where a selected word in the posting box being dragged would trigger this plugin's event?  That's why it was removed from this site...
I didn't remove nothing from no site, sir! Or did I..?
I don't even know what bug you're talking about.
Quote
BTW, whatever became of the ambitious dream to replace attachments with media items?
Ahh.......................................

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Improved attachments upload
« Reply #32, on March 11th, 2013, 04:51 PM »
And even if it does become a core feature, it won't work nicely through externals because core feature implies not being bridged through the plugin manager... so it would need to be a separate tree anyway.
Quote
I don't even know what bug you're talking about.
There was certainly a bug with it affecting events and at least once it was disabled for that reason.

It is currently disabled but there's other reasons why that might be (as other plugins are also disabled without any reason I'm aware of for that)
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,082
[Plugin] Re: Improved attachments upload
« Reply #33, on March 11th, 2013, 04:53 PM »
Hmm, didn't get a "new post" warning when sending the last one, even though I'd posted another... Maybe because it was one of mine..?
Quote from Arantor on March 9th, 2013, 11:53 PM
Sure I remember that. I'm still convinced it's ultimately not a blocker for it being a core feature, but simply that the selector is not as selective as it should be about grabbing events.
(Eh..?!)
Quote
Mostly I think Nao and I have been quietly hoping the other will have a sudden idea on how to solve the architectural issues that come out of it but I think that in the end I'll just have to go in and do it. There is one aspect to it that is rather awkward to solve but not unsolvable, it's just figuring out how to do it without breaking the crap out of everything.
The reason that topics don't use AeMe for attachments is, errr... It's not an *architectural* issue (what's to be afraid of? Creating a generic "Attachments" album where all attachments will go..? Adding a feature to keep track of all topics that make mention of an item? I also wanted to code that one anyway...), it's more that I'm a perfectly reasonable man, and the days I spent on AeMe were crazy, and I did a lot on it, and I know that even after I did all that, there were still tons of bugs, and I was weary of moving the bugs to the attachment system.
But really, the real reason, in reality, is really that, really, I'm super-fucking lazy and I try to focus on features that require less than a week to implement... And this one... It even requires writing a converter!! Eh!! And I'm not going to ask TE to do it... :^^;:

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Improved attachments upload
« Reply #34, on March 11th, 2013, 04:59 PM »
Quote
Hmm, didn't get a "new post" warning when sending the last one, even though I'd posted another... Maybe because it was one of mine..?
Hmm, it should still have warned. Something is very much amiss.
Quote
(Eh..?!)
There's a bug report somewhere around here of someone using the select+drag of text to move it around, except the event was captured by the drag 'n' drop.
Quote
It's not an *architectural* issue (what's to be afraid of? Creating a generic "Attachments" album where all attachments will go..?
The problem that I mention isn't that at all, I wouldn't mind but I have mentioned it multiple times now.

If you have an attachments system like that, you need to be able to reference the topic it came from, not so much for 'which topics use this' but 'can the person see this attachment'. Would really suck if attachments could be leeched without having proper board access.

Right now, access to a given file is based on its album. But that doesn't work for attachments whose access rights are implicitly different. Thus you need to be able to indicate where a given media item is supposed to get its authentication from, be that an album or thread access. Or, indeed, anything else you care to think of, e.g. helpdesk attachments.

I did suggest one method of doing this but you weren't very keen on it.

Nao

  • Dadman with a boy
  • Posts: 16,082
[Plugin] Re: Improved attachments upload
« Reply #35, on March 11th, 2013, 05:20 PM »
And I didn't get a warning for that post either...

Although I just got one for your latest, but it's because you posted it before I hit the Reply button, so I had the warning at post time, not post2 time, basically.
This needs fixing, because it will make people miss on posts, as they're expecting to be told when someone posted in the meantime...
Quote from Arantor on March 11th, 2013, 04:51 PM
There was certainly a bug with it affecting events and at least once it was disabled for that reason.
Probably some discussion I missed. Did that happen after I restored your admin access, maybe..? Otherwise it must be a very old discussion, and I remember having the plugin enabled here...
Quote
It is currently disabled but there's other reasons why that might be (as other plugins are also disabled without any reason I'm aware of for that)
It got disabled when I changed its name, but I'm pretty sure I re-enabled it...
Posted: March 11th, 2013, 05:14 PM
Quote from Arantor on March 11th, 2013, 04:59 PM
Hmm, it should still have warned. Something is very much amiss.
That 'last' param in the URL... Is it only checked against correctly...?
Quote
The problem that I mention isn't that at all, I wouldn't mind but I have mentioned it multiple times now.
Oh, don't talk down to your elders! I'm young enough to remember things! Well, at least part of the things! What was I talking about, already..?
Quote
If you have an attachments system like that, you need to be able to reference the topic it came from, not so much for 'which topics use this' but 'can the person see this attachment'.
I'm of the opinion that this should be done at post time... i.e. if you post an attachment from within a certain topic, get the topic, then the board, get its group list, attach these groups to the item's permissions.
Hmm, does that imply creating a new album on the fly, matching these..? I don't know. I don't remember if AeMe has a setting to fine-tune permissions per-item. I'M NOT OLD!!! I'm just rusty.
Quote
Would really suck if attachments could be leeched without having proper board access.
Well, in some situations I suppose you wouldn't mind...
Quote
Right now, access to a given file is based on its album. But that doesn't work for attachments whose access rights are implicitly different. Thus you need to be able to indicate where a given media item is supposed to get its authentication from, be that an album or thread access.
Or we could just store the id_board in the item table, yeah, and do a {query_see_board} on that.
Quote
I did suggest one method of doing this but you weren't very keen on it.
I don't rem....I'm not old!!

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
[Plugin] Re: Improved attachments upload
« Reply #36, on March 11th, 2013, 05:26 PM »
Quote
Did that happen after I restored your admin access, maybe..? Otherwise it must be a very old discussion, and I remember having the plugin enabled here...
Dunno, not sure.
Quote
It got disabled when I changed its name, but I'm pretty sure I re-enabled it...
Others are disabled, e.g. Users Online Today.
Quote
That 'last' param in the URL... Is it only checked against correctly...?
It should be a num_replies parameter?
Quote
Oh, don't talk down to your elders! I'm young enough to remember things! Well, at least part of the things! What was I talking about, already..?
I guess it's just one of my bugbears that I've gone on about it at times and don't see a solution other than what I'd proposed but you weren't keen on it.
Quote
Well, in some situations I suppose you wouldn't mind...
In some you wouldn't, true, but in those cases the board would be set up to show attachments to guests, i.e. you'd intended to make it the case.
Quote
I'm of the opinion that this should be done at post time... i.e. if you post an attachment from within a certain topic, get the topic, then the board, get its group list, attach these groups to the item's permissions.
Eeek, no. What if you later want to change permissions? You'd have to update all the related items.
Quote
Or we could just store the id_board in the item table, yeah, and do a {query_see_board} on that.
Which is 50% of what I originally suggested.

We would need two columns: type and contextual id. For album items, this would be 'album' and the album id. For regular attachments this would be 'board' and the board id. Or topic id, actually, since there's per-topic privacy.

Then in the file server, you'd fetch the item, figure out what it wants to do to authenticate, check it, and if all good, serve it. The trick is making it extensible.

I don't remember why you weren't keen on it though.

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
[Plugin] Re: Improved attachments upload
« Reply #37, on March 12th, 2013, 08:53 AM »
Bug, I can't get the drop area to appear after dropping my first item. Will have a look at it in a while.

Nao

  • Dadman with a boy
  • Posts: 16,082
[Plugin] Re: Improved attachments upload
« Reply #38, on March 12th, 2013, 09:48 AM »
I installed your copy yesterday, but didn't look into it I have to admit.

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841