BlessingCR’s Blog
BlessingCR’s Blog

每个人都应该懂的文件方案设计

架构图

https://blessingcr.com/wp-content/uploads/2024/01/result-1.png

5.1 文件上传流程

https://blessingcr.com/wp-content/uploads/2024/01/t0.png
  1. 前端发送文件名,MD5, 文件大小等信息提交后端文件服务[注意只限一个文件,多文件多次请求]
  2. 后端文件服务从OBS获取对应文件上传URL,该URL短期有效,且只能上传该MD5,文件名的文件,上传目录为临时目录。
  3. 后端文件服务返回上传URL与后端数据库唯一Key[key是一个字符串]给前端。
  4. 前端通过URL上传文件。
  5. 前端通过KEY告知后端文件服务,文件上传完成。
  6. 前端提交业务表单,表单中文件部分用文件Key表示。后端业务服务获取Key后,发送请求至文件服务,文件服务请求OBS把文件从临时文件夹移动至具体业务文件夹。
    5.2 文件查看流程
    https://blessingcr.com/wp-content/uploads/2024/01/t1.png
  7. 前端请求业务内容,业务内容中包括文件内容
  8. 后端业务服务通过数据库中存储的Key请求文件服务获取URL
  9. 文件服务通过Key查询具体存放路径和文件名,从OBS获取临时URL,URL会在一定时间后过期
  10. 文件服务返回URL给业务服务
  11. 业务服务返回业务内容和URL给前端
  12. 前端通过URL直接从OBS获取内容

发表回复

textsms
account_circle
email

  • d

    ddd

    1 年前 回复
  • d

    1

    1 年前 回复
  • 匿名

    。。。好像那个网卡

    1 年前 回复
  • 匿名

    dd

    1 年前 回复
  • Thank you for another magnificent post. Where else could anyone get that type of information in such a perfect means of writing? I’ve a presentation next week, and I am at the search for such info.

    10 月前 回复
  • Este site é realmente fantástico. Sempre que acesso eu encontro coisas boas Você também pode acessar o nosso site e saber mais detalhes! conteúdo único. Venha descobrir mais agora! 🙂

    9 月前 回复
  • Dead pent content, Really enjoyed reading.

    8 月前 回复
  • I am really impressed along with your writing abilities and also with the structure on your blog. Is this a paid topic or did you customize it your self? Anyway stay up the nice high quality writing, it is uncommon to see a nice weblog like this one nowadays!

    6 月前 回复
  • Hey There. I found your weblog the use of msn. This is an extremely well written article.
    I will make sure to bookmark it and return to learn more of your helpful
    info. Thank you for the post. I will definitely
    comeback.

    My page – nordvpn coupons inspiresensation

    6 月前 回复
  • I’m gone to convey my little brother, that he should also visit this website
    on regular basis to obtain updated from newest news update.

    Here is my page;

    6 月前 回复
  • I am regular visitor, how are you everybody? This piece of
    writing posted at this site is in fact good.

    Feel free to visit my page; vpn

    4 月前 回复
  • Excellent goods from you, man. I have understand your stuff previous to and
    you’re just extremely fantastic. I actually like what you’ve acquired here, really like what you’re saying
    and the way in which you say it. You make it enjoyable and you still take care of to keep it smart.
    I cant wait to read much more from you. This is really a terrific web site.
    https://tinyurl.com/2ah5u2sb gamefly

    3 月前 回复
  • Hiya very nice site!! Guy .. Excellent .. Wonderful ..
    I’ll bookmark your site and take the feeds also? I am glad to find a lot of
    useful info right here in the publish, we want develop extra
    strategies on this regard, thank you for sharing. .
    . . . . What is a vpn and how does it work https://tinyurl.com/24dyn2m6

    3 月前 回复
  • Asking questions are actually good thing if you are not understanding something totally, except this paragraph
    presents good understanding yet.

    3 月前 回复
  • Hello, i think that i saw you visited my site so i came to “return the
    favor”.I am trying to find things to enhance my website!I suppose its ok to use some of your ideas!!

    3 月前 回复
  • Wonderful beat ! I would like to apprentice while you amend your
    web site, how can i subscribe for a blog website?
    The account helped me a acceptable deal. I had been a little bit acquainted
    of this your broadcast provided bright clear idea eharmony special coupon code 2025 https://tinyurl.com/yvodnsan

    1 月前 回复
  • Excellent blog here! Also your site loads up very fast!
    What web host are you using? Can I get your affiliate link to your host?

    I wish my web site loaded up as quickly as yours lol

    Also visit my blog post :: http://winkler-martin.de/messages/61849.html

    3 周前 回复
  • What i don’t realize is if truth be told how you’re now not really much
    more smartly-preferred than you may be right now. You’re so
    intelligent. You understand thus significantly in relation to this matter, produced me in my view consider it from a lot of
    varied angles. Its like women and men don’t seem to be interested until it’s
    one thing to accomplish with Girl gaga! Your individual stuffs
    excellent. All the time care for it up!

    My web page :: https://tinyurl.com/u48j387k

    3 周前 回复

BlessingCR’s Blog

每个人都应该懂的文件方案设计
架构图 5.1 文件上传流程 前端发送文件名,MD5, 文件大小等信息提交后端文件服务[注意只限一个文件,多文件多次请求] 后端文件服务从OBS获取对应文件上传URL,该URL短期有效,且只能上…
扫描二维码继续阅读
2024-01-15