-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Aggiunto salvataggio degli allegati caricati
La backend adesso salva gli allegati ricevuti su (POST) /attachments Modificato fetch di api.js per poter essere utilizzato con content-type multipart invece di avere un secondo metodo praticamente identico Aggiunta validazione lato backend (dimensione file < 20MB) e avvisi lato frontend per validazione degli allegati
- Loading branch information
Showing
8 changed files
with
109 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import Model from './Model' | ||
|
||
export default class Attachment extends Model { | ||
static api_url = 'attachments/' | ||
static table_headers = [ | ||
{ | ||
field: 'filename', | ||
label: "nome file", | ||
enable_sort: true, | ||
enable_link: true | ||
}, { | ||
field: 'size', | ||
label: "dimensione", | ||
enable_sort: true, | ||
}, { | ||
field: 'mimetype', | ||
label: "tipo file", | ||
enable_sort: true, | ||
}] | ||
static sort_default = 'name' | ||
static sort_default_direction = 1 | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters