Git Product home page Git Product logo

large-file-upload's Issues

put largefile field extend to service provider

5,注册进laravel-admin,在app/Admin/bootstrap.php中添加以下代码:
````
Encore\Admin\Form::extend('largefile', \Encore\LargeFileUpload\LargeFileField::class);
````

I suggest to put it into service provider's boot

    public function boot()
        Admin::booting(function () {
             \Encore\Admin\Form::extend('largefile', \Encore\LargeFileUpload\LargeFileField::class); 
        });
    }

升级到 0.0.3以后上传失败

将"peinhu/aetherupload-laravel": "^2.0",升级了,上传文件报错。
setGroup方法不存在
\Encore\LargeFileUpload\LargeFileField::class 文件下
$('#{$name}-resource').change(function(){
aetherupload('{$name}', this).setGroup('{$this->group}').setSavedPathField('#{$name}-savedpath').setPreprocessRoute('/aetherupload/preprocess').setUploadingRoute('/aetherupload/uploading').setLaxMode(false).success().upload('{$name}')
}); 这里调用的方法不存在;
public/vender/laravel-admin-ext/large-file-upload/js/aetherupload.admin.js 下未找到对应的方法

建议兼容官方 Field view 属性渲染

这个扩展很好用,但是有一些不足之处,建议模板渲染保留laravel-admin field 模板属性,下午需要对
字段添加 form-group 类选择器,发现怎么也加不上去,发现是因为没有兼容官方的view 属性问题,希望加上

在 view里 做如下修改
<div class="{{ $viewClass['form-group'] }} {!! !$errors->has($label) ?: 'has-error' !!}" >

参考button view

用的laravel-admin1.8.1,报:错误:创建子文件夹失败

请教学长,我遇到的问题是。
aetherupload/preprocess 方法时,停住了。

error "错误:创建子文件夹失败"
chunkSize 1000000
groupSubDir "202007"
resourceTempBaseName "1595717260205833"
resourceExt "mp4"
savedPath ""

--我另有一个项目,类似的,�就可以用,文件都复制一样的。
请问我应该如何调试呢?非常谢谢!
主要是看不懂源码,可以有偿请学长讲解一下这个扩展吗,这样方便后续使用。

上传相同类型文件会返回同一个hash

我第一次上传了一个test.txt文件上传成功了,后面又上传一个test1.txt文件且内容不相同,上传成功了但是找不到这个文件,我在本地测试发现这两个文件返回了同一个md5_file()的hash值,最后被你的程序识别成了同一个文件,程序如下
public function renameTempFile()
{
$savedFileHash = $this->generateSavedFileHash($this->uploadPartialFile);

    if ( RedisHandler::hashExists($savedFileHash) ) {
        $this->savedPath = RedisHandler::getFilePathByHash($savedFileHash);
    } else {
        $this->savedPath = ConfigMapper::get('FILE_DIR') . DIRECTORY_SEPARATOR . ConfigMapper::get('FILE_SUB_DIR') . DIRECTORY_SEPARATOR . $savedFileHash . '.' . $this->uploadExt;

        if ( ! @rename($this->uploadPartialFile, ConfigMapper::get('UPLOAD_PATH') . DIRECTORY_SEPARATOR . $this->savedPath) ) {
            return false;
        }
    }

    return $this->savedPath;
}

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.