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

Implement File Upload Size Limitation Feature #85

Open
grantcopley opened this issue Jan 25, 2023 · 0 comments
Open

Implement File Upload Size Limitation Feature #85

grantcopley opened this issue Jan 25, 2023 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@grantcopley
Copy link
Collaborator

grantcopley commented Jan 25, 2023

Objective:

Introduce a functionality in CBWIRE to specify and enforce a file upload size limit.

Details:

The enhancement involves the ability to set a maximum file size for uploads in CBWIRE. Currently, when a file upload is initiated, CBWIRE requests a signed upload URL and receives the file's size. This process presents an opportunity to implement size checks before the upload proceeds.

Initial Incoming Request:

{
  "fingerprint": {
    "id": "lqfNNk5kc2O5Gh8s9tAI",
    "name": "my-test",
    "locale": "en",
    "path": "/",
    "method": "GET",
    "v": "acj"
  },
  "serverMemo": {
    "children": [],
    "errors": [],
    "htmlHash": "48e6dd7c",
    "data": {
      "clicked": false,
      "myFile": ""
    },
    "dataMeta": [],
    "checksum": "8dd9b6e1456bd3c73651446497a4b72125ece6dd58c724815eb720c1e7f5e2d2"
  },
  "updates": [
    {
      "type": "callMethod",
      "payload": {
        "id": "ksfh",
        "method": "startUpload",
        "params": [
          "myFile",
          [
            {
              "name": "2022-08-21 07.52.50.gif",
              "size": 424008,
              "type": "image/gif"
            }
          ],
          false
        ]
      }
    }
  ]
}

Example Use Case:

An application requires users to upload profile pictures. To optimize storage and bandwidth, a size limit of 200KB is set for these images. When a user attempts to upload a file, CBWIRE checks the file size against this limit before proceeding with the upload.

Expected Functionality:

File Size Verification: On receiving the initial upload request, CBWIRE verifies the file size against a pre-set maximum limit.
Upload Approval/Denial: If the file size is within the allowed range, the upload proceeds. Otherwise, the upload is denied, and the user is notified of the size limitation.
Customizable Limits: Allow administrators or developers to set and modify the file size limits as per application requirements.

@grantcopley grantcopley added the enhancement New feature or request label Jan 25, 2023
@grantcopley grantcopley added this to the v2.3 milestone Jan 25, 2023
@grantcopley grantcopley changed the title Add ability to specify file upload size limit Implement File Upload Size Limitation Feature Jan 7, 2024
@grantcopley grantcopley modified the milestones: v2.3, 3.3 Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant