How to send files to user client

I am a student and new to RASA and Django. I am trying to create a bot which will send forms to the user when asked. So when the user asks for a registration form, my custom action would search its current folder and get the file (using relative path not full file path). Right now the bot only responds with the name of the file. How do I send the file to the user using a Django Website client? The files are in my RASA bot folder so how do I give the file to Django because if I give a relative path it will be wrong as the files has to be in static folder and I can’t give a full file path due to security restrictions on web. So how do I solve this? I want to send pdf, images, docx, etc files to the user client. I dont think keeping the files in static folder of django will work as the django server and RASA server might be different. So the custom action might not be able to search for the file. It would be helpful for others if we can do the same for other clients like facebook, slack etc.

1 Like