Giter Site home page Giter Site logo

Comments (11)

peinhu avatar peinhu commented on June 13, 2024 1

场景是网页表单上传,

后端还是要搬出来,因为要登录才能上传

这个支持自定义中间件的,可以在自定义中间件里面验证是否登录。

from aetherupload-laravel.

peinhu avatar peinhu commented on June 13, 2024

本插件是全自动完成的,不用写后端调用代码。你再仔细看下那个示例,上传完直接能返回文件保存地址,然后你表单点提交后存到数据库就行了,后端只需要写接收文件保存地址的代码。

from aetherupload-laravel.

ieiis avatar ieiis commented on June 13, 2024

因为接口开发某些原因,我需要直接引用您的preprocess()和saveChunk()方法,参数正确会导致合并出问题不

from aetherupload-laravel.

peinhu avatar peinhu commented on June 13, 2024

插件预设使用场景是网页表单上传,如果是API使用的话,客户端需要有和前端js相同的实现,两个路由(/aetherupload/preprocess,/aetherupload/uploading)提交的参数要相同,可以自己参考https://github.com/peinhu/AetherUpload-Laravel/blob/master/assets/aetherupload-core.js的参数和逻辑来写。

from aetherupload-laravel.

peinhu avatar peinhu commented on June 13, 2024

如果参数、前端逻辑一样,应该不会有问题,等我有空试试。

from aetherupload-laravel.

ieiis avatar ieiis commented on June 13, 2024

好的我这里自查一下感谢回复!!

from aetherupload-laravel.

peinhu avatar peinhu commented on June 13, 2024

你前端其实也可以用我的后端逻辑?只要请求的路由是一样的,返回的结果也一样,只是你客户端的逻辑要自己写了。

from aetherupload-laravel.

peinhu avatar peinhu commented on June 13, 2024

后端逻辑其实我都已经写好了,不需要使用者自己写或者主动调用的,API的话,关键还是写前端的逻辑,客户端是安卓IOS?

from aetherupload-laravel.

ieiis avatar ieiis commented on June 13, 2024

嗯呢 目前是web端 应该是参数的问题吧

from aetherupload-laravel.

peinhu avatar peinhu commented on June 13, 2024
请求路由 /aetherupload/preprocess
resource_name: example.zip
resource_size: 3509548
resource_hash: 508251fad2a81e3ec845800a4a440e51
locale: zh
group: file

请求路由 /aetherupload/uploading
resource_chunk: (二进制)
resource_ext: zip
chunk_total: 4
chunk_index: 1
resource_temp_basename: 1660012008535230
group: file
group_subdir: 202208
locale: zh
resource_hash: 508251fad2a81e3ec845800a4a440e51

参数按这个传就行了

from aetherupload-laravel.

Joycezhangw avatar Joycezhangw commented on June 13, 2024

场景是网页表单上传,

后端还是要搬出来,因为要登录才能上传

from aetherupload-laravel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.