aboutsummaryrefslogtreecommitdiff
path: root/ExamTemplate/Services
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2021-05-12 16:26:26 +0300
committerSyndamia <kamen.d.mladenov@protonmail.com>2021-05-12 16:26:26 +0300
commit3ba9108bc24f0419a552f535fbc7495071884e97 (patch)
tree56eb2a857646305472693bad7a3ac1ee5773da3c /ExamTemplate/Services
parente31d09d1ef195bbcc1f8455d58f401125a3050a9 (diff)
downloadit-kariera-exam-template-3ba9108bc24f0419a552f535fbc7495071884e97.tar
it-kariera-exam-template-3ba9108bc24f0419a552f535fbc7495071884e97.tar.gz
it-kariera-exam-template-3ba9108bc24f0419a552f535fbc7495071884e97.zip
Implemented Cloudinary interface
Diffstat (limited to 'ExamTemplate/Services')
-rw-r--r--ExamTemplate/Services/CloudinaryService.cs3
-rw-r--r--ExamTemplate/Services/Interfaces/ICloudinaryService.cs11
2 files changed, 13 insertions, 1 deletions
diff --git a/ExamTemplate/Services/CloudinaryService.cs b/ExamTemplate/Services/CloudinaryService.cs
index 03b7265..ef421e7 100644
--- a/ExamTemplate/Services/CloudinaryService.cs
+++ b/ExamTemplate/Services/CloudinaryService.cs
@@ -5,10 +5,11 @@ using System.Threading.Tasks;
using CloudinaryDotNet;
using CloudinaryDotNet.Actions;
using Microsoft.AspNetCore.Http;
+using ExamTemplate.Services.Interfaces;
namespace ExamTemplate.Services
{
- public class CloudinaryService
+ public class CloudinaryService : ICloudinaryService
{
// Regex for getting the filename without (final) filename extension
// So, from image.png, it will match image, and from doc.my.txt will match doc.my
diff --git a/ExamTemplate/Services/Interfaces/ICloudinaryService.cs b/ExamTemplate/Services/Interfaces/ICloudinaryService.cs
new file mode 100644
index 0000000..9c4d884
--- /dev/null
+++ b/ExamTemplate/Services/Interfaces/ICloudinaryService.cs
@@ -0,0 +1,11 @@
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Http;
+
+namespace ExamTemplate.Services.Interfaces
+{
+ public interface ICloudinaryService
+ {
+ Task<List<string>> UploadFilesToCloud(List<IFormFile> formFiles);
+ }
+}