T
T
TechNOIR2020-06-27 19:02:12
C++ / C#
TechNOIR, 2020-06-27 19:02:12

C# Net Core Web API. Is it possible to send a file via POST api to a server and get a temporary link to it?

Good afternoon.

Is it possible to send a file via POST api to a server and get a temporary link to it?
I want to send a file to api, modify it there and return a temporary link to it, so that after downloading the file is either deleted from the server or not stored at all.

Can I do this?
Does anyone have a mini example?

thanks in advance

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
rPman, 2020-06-27
@TechNOIR

https://docs.microsoft.com/ru-ru/aspnet/core/mvc/m...
put the file in a specific folder and delete it by timeout (wrong but simple), you can analyze the server logs to understand who is downloading the file or not , or implement the distribution of the file yourself (wrong from an architectural point of view)

V
Vladimir Korotenko, 2020-06-28
@firedragon

Do the following
Post /api/tempfile url:, passkey
Get /api/tempfile/url/passkey
Del /api/tempfile/url/passkey
Additionally, you can pervert with chunks, that is, split the file into parts of 2 megabytes and look at the contentrange header Removing parts after download

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question