Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Back End] Upgrade existing Upload File Endpoint #101

Open
taichan03 opened this issue Mar 6, 2024 · 0 comments
Open

[Back End] Upgrade existing Upload File Endpoint #101

taichan03 opened this issue Mar 6, 2024 · 0 comments
Assignees

Comments

@taichan03
Copy link
Collaborator

Objective

Modify the existing document management system's API endpoint to support additional functionality and data fields in line with new project specifications. These changes aim to enhance the system's capability in handling file operations, including uploading, listing, and deleting documents.

Scope
API Endpoint Modifications:

Update the existing API to accept POST, GET, and DELETE requests.
Ensure compatibility with the newly specified data fields.
Data Fields to be Supported:

  1. GUID (Globally Unique Identifier)
  2. Filename
  3. File Content
  4. Date of Upload
  5. Size
  6. Page Number
  7. File Type
  8. Uploaded By
  9. Title
  10. Source URL
  11. Analyzed (Y/N)
  12. Approved (Y/N)

Functional Requirements

POST (File Upload):

Accept a JSON payload containing filename, file_content (Base64 encoded), size, page_number, file_type, uploaded_by, title, and source_url.
Automatically generate and assign a GUID and Date of Upload upon file submission.
Set the Analyzed and Approved fields to 'N' by default.

JSON payload for POST endpoint:

{
"filename": "example.pdf",
"file_content": "",
"size": 102400, // Size in bytes
"page_number": 15,
"file_type": "pdf",
"uploaded_by": "username",
"title": "Example Document Title",
"source_url": "http://example.com/source-of-the-document"
}

GET (List Files):

Retrieve a list of files along with their respective information, as outlined in the data fields.

DELETE (Remove File):

Allow the removal of a file from the system using its GUID.

Technical Specifications

  • Implement authentication for the POST, DELETE, and GET requests to prevent unauthorized file uploads or deletions.
  • The system must ensure the integrity and security of the file content during upload, storage, and retrieval.
  • All API responses should be in JSON format, adhering to RESTful principles.

This is what is already created. This needs to be modified to the above requirements.

Image

Image

@taichan03 taichan03 changed the title [Back End] Upload File Endpoint [Back End] Upgrade existing Upload File Endpoint Mar 6, 2024
@ryanrrogers ryanrrogers self-assigned this Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants