当前位置:网站首页>记录一个诡异的图片上传问题
记录一个诡异的图片上传问题
2022-06-26 00:15:00 【慕容田雨】
今天我在写表单提交的时候,发现一个奇怪的问题,甚是纳闷。
当前在做一个商城模块,当我要上传身份证正反面和商家的营业执照等图片的时候,会一个上传成功,一个上传不成功,然后一个又成功,一个又失败。我死活想不通,这到底是为啥捏?
然后反复检查我的代码,没发现什么不对的,纠结了半天,后来就再网上找有一个说,加一个随机数参数或者当前时间参数就可以了,然后我就试了下,果然好使了。仔细想想,可能就是多次上传让服务器以为是重复请求,然后就给没有给发请求。
其实在发送请求的时候,在链接后面加一个参数等于随机数或者加一个当前时间的参数就好,为了区分,每一次请求都不一样,这样就可以轻松上传了。下班咯!
边栏推荐
猜你喜欢

CYCA少儿形体礼仪 乐清市培训成果考核圆满落幕

recvmsg & sendmsg

Sunshine boy chenhaotian was invited to be the spokesperson for the global finals of the sixth season perfect children's model

Interpretation of script corresponding to postman assertion

通俗易懂C語言關鍵字static

biggan:large scale gan training for high fidelity natural image synthesis

论文阅读 Exploring Temporal Information for Dynamic Network Embedding

Sweet girl lisixia was invited to be the little host of the global finals of the sixth season perfect child model

Sweet cool girl jinshuyi was invited to be the spokesperson for the global finals of the sixth season perfect children's model

分布式系统(二)分布式事务的理解
随机推荐
木瓜蛋白酶的特点及相关特异性介绍
Postman断言对应脚本的解释
tos cos dscp 区别和作用
微信朋友圈测试点
蒟蒻初学单片机的一丢丢笔记
前置++,后置++与前置--与后置--(++a,a++与--a,a--)
Data analysis - similarities and differences between C-end and b-end data analysis
Differences and functions of TOS cos DSCP
阳光男孩陈颢天 受邀担任第六季完美童模全球总决赛代言人
Steps of program compilation precompile compilation assembly connection
The 19th - 22nd week of scientific research training - about tnet and memnet
Viwi interface
Web Testing
JQ user defined attribute value
PTA class a simulated fifth bomb: 1148-1151
轻轻松松理解指针
元气少女王钰洁 受邀担任第六季完美童模全球总决赛代言人
Interpretation of script corresponding to postman assertion
Sunshine boy chenhaotian was invited to be the spokesperson for the global finals of the sixth season perfect children's model
User unlock status query