Comments (15)
现在就可以啊 /upload 参数file
from telegraph-image.
能否提示一下如何调用呢,我用PHP试了一下,没有返回正确的值。
代码如下:
<?php
if(isset($_POST['submit'])) {
$file = $_FILES['file']['tmp_name'];
$url = 'https://im.gurl.eu.org/upload';
$cFile = new CURLFile($file);
$postData = array('file' => $cFile);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo "<pre>" . htmlspecialchars($response) . "</pre>";
}
?>
from telegraph-image.
from telegraph-image.
这是哪个软件?看着比postman好
from telegraph-image.
这是哪个软件?看着比postman好
ApiPost
from telegraph-image.
Apifox直接生成php-curl的代码应该就可以了,很香
from telegraph-image.
from telegraph-image.
请问下哈,上传返回的json能否是字典而不是数组,目前看api是单图上传,返回数组似乎也不太符合语义;另一点就是我想跟一些工具,也不大支持数组格式的报文。
from telegraph-image.
from telegraph-image.
那得自己改一下接口返回了
直接改reponse不是太合适,我想新增一个,比如叫 /upload/v2,请教下可以在哪个文件里加吗
from telegraph-image.
大佬,他这个工具的思路是什么啊,由于nuxt那里是打包之后的,我没法看到代码细节
没法复刻
from telegraph-image.
from telegraph-image.
请问下,file对应的值,是图片转Base64的值吗,为什么传的不行,加了base64的头“data:image/jpeg;base64,”和没加头的值都试了。结果都是"error": "No files passed"。
from telegraph-image.
请问下,file对应的值,是图片转Base64的值吗,为什么传的不行,加了base64的头“data:image/jpeg;base64,”和没加头的值都试了。结果都是"error": "No files passed"。
测试工具如果是 apifox的话,步骤为 点击body再选择form-data,参数名为file,类型选择为file,之后右边的参数值就会出现上传按钮,这是截图
from telegraph-image.
但是使用代码axios就是403错误
from telegraph-image.
Related Issues (20)
- Try again later HOT 2
- 希望增加URL上传功能 HOT 2
- 上传图片失败 HOT 1
- KV设置正确 进入图片管理页时报错 详细图文描述 跪求大佬解答 HOT 9
- 关于文件上传的BUG
- 大佬大佬,登陆管理的账号怎么看啊,我一直进不去 HOT 1
- 你们后台都是怎么登陆进去的啊 HOT 1
- 有批量上传吗? HOT 3
- 无法访问图床网站 HOT 1
- 无法打开管理页面,提示:An error occurred while synchronizing data with the server, pleasecheck the network connection
- 上传视频成功,但是链接无法播放 HOT 1
- 关于文件审查 HOT 1
- 手搓了一个前端,开源,支持自定义页面、批量上传、拖拽上传等😊😊 HOT 4
- 可以支持音频格式吗?
- 使用fetch调用上传图片API时,报CORS错误,大家有遇到吗 HOT 3
- 提供两个鉴黄接口
- 环境变量里不设置账号和密码,而是用cloudflare access来保护后台登录的话,登录后台后右上角无法显示网格视图和瀑布流两个按钮 HOT 5
- 上传图片后台没有? HOT 1
- 使用picgo图片无法上传 HOT 1
- KV bindings have been set up according to the documentation but the admin backend is still unavailable. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telegraph-image.