#305-fileService PR 2.0 #947
No reviewers
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked, waiting for further changes
bug
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
help wanted
invalid
low priority
needs input
needs review
project documentation
question
research
reviewed
script
security
SQL
style
testing
topLevel
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K!947
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "#305-fileService"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
fileService
Created a service to upload and download files to.
Endpoints
GET /f/{id}POST /upload/Testing
I recommend rebuilding everything before testing.
For testing the
/api/files/upload/endpoint you can either use an HTML file:Or you can use Bruno. In order to use bruno, you must send the upload as a POST request, with the MIME/media type being "multipart/form-data". The image should be sent in the Key/Value field with the key name being "image". Here you can see an example:

In order to view your uploaded file, you use the


/api/files/f/{id}endpoint, with the id being the "name" field of the response you get when you upload. Here is what that looks like in a browser:And in bruno:
Note that in bruno, you must enter the id as a path variable by typing
/api/files/f/:idin the url, and then entering the value in the table for path variables. See the example above.Review on #305
Whats done
Implemented a file system.
Tested on Windows using Bruno
Inspected following files.
What needs to be done
Conclusion
I've removed the comment. I think i misunderstood what you meant by with the blankspace in UnitTest1.cs and fileService.Test.csproj but I removed a blank line in one of them. I'm couldn't find a way to remove the [U+FEFF] so I think we might have to live with it. I also changed file_contenttype to file_content_type in the database and the DatabaseQueries file.
Looks good!