summaryrefslogtreecommitdiffstats
path: root/models/attachment.go
Commit message (Collapse)AuthorAgeFilesLines
* Display ui time with customize time location (#7792)Lunny Xiao2019-08-151-4/+4
| | | | | | | | | | | | | | | | | | * display ui time with customize time location * fix lint * rename UILocation to DefaultUILocation * move time related functions to modules/timeutil * fix tests * fix tests * fix build * fix swagger
* Move sdk structs to modules/structs (#6905)Lunny Xiao2019-05-111-1/+1
| | | | | | | | | | | | * move sdk structs to moduels/structs * fix tests * fix fmt * fix swagger * fix vendor
* fix upload attachments (#6481)Lunny Xiao2019-04-021-6/+3
| | | | | | | | * fix upload attachments * add migration for new column uploader_id on table attachment * fix imports sequence
* Added URL mapping for Release attachments like on github.com (#1707)gdeverlant2019-01-061-0/+17
|
* Add Size column to attachment (#3734)Jonas Franz2018-03-311-22/+9
| | | | | | | | | | | | | | | * Add size column to attachment Migrate attachments by calculating file sizes Signed-off-by: Jonas Franz <info@jonasfranz.software> * Calculate attachment size on creation Signed-off-by: Jonas Franz <info@jonasfranz.software> * Log error instead of returning error Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Improve release page UI (#3693)Jonas Franz2018-03-191-0/+11
| | | | | | | | | | * Improve release page ui by adding size Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add documentation to a.MustSize() Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add Attachment API (#3478)Jonas Franz2018-03-061-2/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
* Small improve on deleting attachements (#3145)Lunny Xiao2017-12-241-8/+17
| | | | | | * Small improve on deleting attachements * improve the sequence of deletion
* simple usage of x (#3144)Lunny Xiao2017-12-111-4/+1
|
* Refactor struct's time to remove unnecessary memory usage (#3142)Lunny Xiao2017-12-111-10/+3
| | | | | | | | | | | | | | * refactor struct's time to remove unnecessary memory usage * use AsTimePtr simple code * fix tests * fix time compare * fix template on gpg * use AddDuration instead of Add
* Use AfterLoad instead of AfterSet on Structs (#2628)Lunny Xiao2017-10-011-7/+7
| | | | | | | | * use AfterLoad instead of AfterSet on Structs * fix the comments on AfterLoad * fix the comments on action AfterLoad
* Use created & updated instead BeforeInsert & BeforeUpdate (#2482)Lunny Xiao2017-09-131-6/+1
| | | | | | | | | | | | * use created & updated instead BeforeInsert & BeforeUpdate * fix vendor checksum * only show generated SQL when development mode * remove extra update column updated_unix * remove trace config
* Refactor session close as xorm already does everything needed internally (#2020)Lauris BH2017-06-211-1/+1
|
* feat: add download count field and unit testing for attachment. (#1512)Bo-Yi Wu2017-04-201-9/+22
| | | | | | | | | | | | | | * feat: add download count field and unit testing. * fix: unit testing * refactor: improve testing. * fix: update comment * add default value. Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Fix unused Engine bugs (#1064)Ethan Koenig2017-02-271-1/+1
|
* Allow custom public files (#782)Thomas Boerger2017-01-281-1/+0
| | | | | | * Allow custom public files * Gofmt code, lots of places not related to this pr
* Spun attachments into seperate go file (#701)Philip Couling2017-01-201-0/+176
Moved attachments into seperate go file