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

require a new action to save images and documents in device #1798

Closed
mehsaandev opened this issue Dec 31, 2024 · 3 comments · Fixed by #1799
Closed

require a new action to save images and documents in device #1798

mehsaandev opened this issue Dec 31, 2024 · 3 comments · Fixed by #1799
Assignees

Comments

@mehsaandev
Copy link
Contributor

mehsaandev commented Dec 31, 2024

I need an action to save my image and documents in my device storage given that the blob will be provided as an input.

Requirements:

  • User should be able to pass blob input and file name and it should save in the default storage of the device.
  • In case of Android the Images should be in DCIM/Pictures and the Documents should be in Documents folder.

Proposed Action Structure:

  • In case the Blob is passed as input:
  1. For Image:
    In case the type is image, it'll be saved in DCIM/Pictures
Button:
  onTap:
     saveFile:
       fileName: 'Test.png'
       type: image
       blobData:  # blob string for image
  1. For Document:
    In case the type is document, it'll be saved in Documents
Button:
  onTap:
     saveFile:
       fileName: 'Test.png'
       type: document # pdf, docx, txt
       blobData:  # blob string for document
  • In case the URL is passed for the media:

In case of URL, it the action will get the file from the URL and convert it to image and then save it because in many cases we have to store the URL image to our phone storage.

Button:
  onTap:
     saveFile:
       fileName: 'Test.png'
       type: document # pdf, docx, txt
       source:  # source-url for document
@mehsaandev mehsaandev self-assigned this Dec 31, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Ensemble Dec 31, 2024
@kmahmood74 kmahmood74 moved this from Backlog to Ready for Work in Ensemble Jan 4, 2025
@kmahmood74
Copy link
Collaborator

how is it going? @mehsaandev

@mehsaandev mehsaandev linked a pull request Jan 5, 2025 that will close this issue
@mehsaandev
Copy link
Contributor Author

mehsaandev commented Jan 6, 2025

I've pushed the latest, it's under review @kmahmood74

@mehsaandev
Copy link
Contributor Author

mehsaandev commented Jan 6, 2025

Example Usage:

In case the Blob is passed as input:
For Image:
In case the type is image, it'll be saved in DCIM/Pictures

Button:
  onTap:
     saveFile:
       fileName: 'Test.png'
       type: image
       blobData:  # blob string for image

For Document:
In case the type is document, it'll be saved in Documents

Button:
  onTap:
     saveFile:
       fileName: 'Test.png'
       type: document # pdf, docx, txt
       blobData:  # blob string for document

In case the URL is passed for the media:
In case of URL, it the action will get the file from the URL and convert it to image and then save it because in many cases we have to store the URL image to our phone storage.

Button:
  onTap:
     saveFile:
       fileName: 'Test.png'
       type: document # pdf, docx, txt
       source:  # source-url for document

@github-project-automation github-project-automation bot moved this from Ready for Work to Released in Ensemble Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Released
Development

Successfully merging a pull request may close this issue.

2 participants