apollo_upload_server-ruby icon indicating copy to clipboard operation
apollo_upload_server-ruby copied to clipboard

Feature Request: Uploading Files to Association's Record Without Removing Old Ones

Open mariosobhy opened this issue 2 years ago • 0 comments

Problem

Currently, when uploading files to an association's record using the ApolloUploadServer::Upload type, the old files are removed, which may not be the desired behavior for all use cases. This makes it challenging to append new files to an existing collection of files associated with a record.

Desired Behavior

I would like to request a new feature that allows uploading files to an association's record without removing the old ones. Instead, the new files should be appended to the existing collection of files.

Implementation Details

As a user, I would expect to be able to upload a new file to an association's record while preserving the old files. This can help in scenarios where multiple files need to be associated with a single record.

Example

Here is an example of the current argument definition:

argument :pictures, ApolloUploadServer::Upload, required: false,
         prepare: -> (file, _ctx) { create_blob(file) }, description: "It accepts a File object."

mariosobhy avatar Oct 11 '23 00:10 mariosobhy