Create file using mutation

Hi, I was wondering, when using the Shopify file mutation, is it possible to create a file so that it doesn’t appear in the Shopify admin i.e. in here Content → Files? For example, when uploading a file in the order timeline, the file doesn’t appear in Content → Files section in the admin.

The idea is to store the file in Shopify somewhere but not have it appear on the UI, the only way to access the file would be via the url which is generated when creating the file.

Thanks in advance.

1 Like

Hey @Codeminds :waving_hand: - right now there’s not a way to create a file that isn’t accessible through the file menu in the Admin UI through our Files API due to how the component currently works.

I can check to see if it’s a feature on our roadmap for you though - just out of curiosity, what were you looking at using that feature for if it was possible? Just want to see if we have any other workarounds for your use case too if possible.

Hi Alan,

Thanks for your reply. Ok so the reason I don’t want to show the uploaded file in the Files are of the admin UI is because it may contain sensitive customer information which shouldn’t be visible to user such as a Content person who may have access to the other Files such as products, other website assets but not customer/order related files. One way to achieve this is to store the files in an external service such as an s3 bucketm however, I noticed that when a file is attached in the timeline, it doesn’t add the file in the Files section of the admin, it’s help somewhere else, so I thought I may be able to create the file in this way as well.