- **status**: in-progress --> review
- **Comment**:

Closed #877.

`ib/8003`

Note that if you're replacing image attachment thumbnail will not change 
rightaway. It will change only if you reload a page manually. That's because of 
browser caching. At least in Chrome, after adding the attachment and 
redirecting back to the, let's say, tickets page, browser will not issue 
another request for thumbnail, but will use one in cache. To avoid that we'll 
need to change thumb/attach url whenever image is changed (e.g. append 
`?<last-changed-date>` to the url). We're setting `ETag`, but it's not 
sufficient because browser doesn't make request to check if image changed in 
some cases as I described above.

I didn't change url right now, since there's quite a few places that need to be 
changed. E.g. thumb url always constructed manually from `attach.url()` in 
templates, so changing `attach.url()` to append `?<last-changed-date>` will 
break those and probably the right way will be to add separate method to 
`Attachment` class for `thumb_url` and use that everywhere.

Anyway, wanted to consult you guys before doing that. Check out the new code 
and let me know what do you think. Thanks



---

** [tickets:#8003] Bugs in attachments to comments**

**Status:** review
**Milestone:** unreleased
**Labels:** 42cc sf-2 sf-current 
**Created:** Wed Oct 14, 2015 04:44 PM UTC by Dave Brondsema
**Last Updated:** Thu Dec 24, 2015 03:55 PM UTC
**Owner:** Igor Bondarenko


Editing a comment to modify its attachments has some bugs, compared to what you 
can do for top-level artifact attachments.

* no way to delete an attachment
* uploading with the same name duplicates the file, rather than replace it (see 
[#4350] which could be considered a feature)


---

Sent from forge-allura.apache.org because [email protected] is subscribed 
to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://forge-allura.apache.org/p/allura/admin/tickets/options.  Or, if this is 
a mailing list, you can unsubscribe from the mailing list.

Reply via email to