Documentation ¶
Index ¶
- type FileMetadata
- type FileUploadService
- func (s *FileUploadService) DeleteFromLocal(filePath string) error
- func (s *FileUploadService) DeleteFromS3(filePath string, cfg *config.Config) error
- func (s *FileUploadService) DeleteImage(filePath string) error
- func (s *FileUploadService) FileUpload(r *http.Request, formKey string, folder string) (*FileMetadata, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileMetadata ¶
type FileUploadService ¶
func NewFileUploadService ¶
func NewFileUploadService(cfg *config.Config) *FileUploadService
func (*FileUploadService) DeleteFromLocal ¶
func (s *FileUploadService) DeleteFromLocal(filePath string) error
DeleteFromLocal deletes file from local disk
func (*FileUploadService) DeleteFromS3 ¶
func (s *FileUploadService) DeleteFromS3(filePath string, cfg *config.Config) error
DeleteFromS3 deletes file from AWS S3
func (*FileUploadService) DeleteImage ¶
func (s *FileUploadService) DeleteImage(filePath string) error
Example usage to delete an image (assuming you have the filePath stored)
func (*FileUploadService) FileUpload ¶
func (s *FileUploadService) FileUpload(r *http.Request, formKey string, folder string) (*FileMetadata, error)
Click to show internal directories.
Click to hide internal directories.