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

Add shouldRemove in upload method to delete file after successful upload #3854

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mohshin-shah
Copy link

Goals ⚽

  • Add a new parameter shouldRemove to the Alamofire upload function to control whether the uploaded file should be removed after upload completion.
  • Write test cases to verify the functionality of the shouldRemove parameter and ensure that the file is deleted after upload.

Implementation Details 🚧

  • The addition of the shouldRemove parameter allows users to specify whether the file should be deleted after upload, providing more flexibility and control.
  • The parameter is added to the Session's upload function for file uploading and properly documented to maintain consistency with the naming convention used for Uploadable's case file(URL, shouldRemove: Bool).
  • The same approach used for testing the shouldRemove parameter as other upload tests to maintain consistency across the codebase.

Testing Details 🔍

Test case testFileUploadSuccessAndDeletion is added to existing UploadTests to validate the file upload success and deletion functionality.

…sful upload

- Add test case `testFileUploadSuccessAndDeletion` to `UploadTests.swift`
- Verify that the file is uploaded successfully to the specified endpoint
- Verify that the file is deleted after successful upload completion

Additionally, this commit includes the following changes:
- Updated documentation for `upload` function in Alamofire
- Added parameter for controlling file deletion of a file after successful upload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant