Giter Site home page Giter Site logo

adrianbj / customuploadnames Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 2.0 222 KB

ProcessWire module to automatically rename file (including image) uploads according to a configurable format

License: GNU General Public License v2.0

JavaScript 9.51% PHP 90.21% CSS 0.28%
file image processwire renaming-rules upload

customuploadnames's People

Contributors

adrianbj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

lisandi tobaco

customuploadnames's Issues

Getting error when i want to save page.

Getting error when i want to save page (not trying to upload file only saving page). I am using new Fieldtype on this page FieldtypeFieldsetPage maybe problem cause from this.

ekran resmi 2017-09-22 15 06 16

ProcessWire 3.0.75
PHP 7.1
Macos Sierra

Upload fails

Hi!

Using this module for the first time. I'm on windows. When I create a rule to rename the uploaded file to $page->title, upload is stucked. Network console in browser report that rename failed in Pagefile.php on line 942, this is rename() method. I debuged that method and discovered that rename($this->filename, $this->pagefiles->path . $basename) is executed as
rename(C:/inetpub/wwwroot/site/assets/files/1015/AdminThemeSplits.txt,C:/inetpub/wwwroot/site/assets/files/1015/C:/inetpub/wwwroot/site/assets/files/1015/ena.txt) (AdminThemeSplits.txt is input file name, and 'ena' is page title.

If I disable the rule, upload is working.

Issue with RepeaterMatrix

Hi Adrian!

First of all, thanks for your really handy Module.

We have a problem with CustomUploadNames and the ProFields RepeaterMatrix. Image fields inside the Matrix don't upload files anymore – instead, the progress spinner rotates forever, even when the file is already uploaded.

We're running:
• ProcessWire 3.0.62
• ProFields RepeaterMatrix 0.0.4
• CustomUploadNames 1.0.5

Thanks for your help!

Getting error when i try to save a page via api

Module version: 1.0.2
ProcessWire version: 3.0.82-dev
PHP version: 7.1.11

I am trying to change field values via $page api.

After i apply a code like below (I am also changing repeater values) :

$en = languages()->get("default"); // retrieve English
$tr = languages()->get("tr"); // retrive Turkish
$enValue = page()->getLanguageValue($en, 'title');
$trValue = page()->getLanguageValue($tr, 'title');
page()->of(false); // outputFormatting must be OFF
page()->title->setLanguageValue($en, $trValue); // set in English
page()->title->setLanguageValue($tr, $enValue); // set in Turkish
page()->save(); // save the page with the new language values

Getting this error :
ekran resmi 2017-11-06 17 21 23

For the moment i added if(count(fields)) statement for both error. if you have different solution i will update module after fix.

Thanks

Why is this a Process module?

I stumbled over your module as I think I once downloaded it via modules manager testing. Is there any reason I don't see? It should be a autoload WireData module.

This is not the first time I see this (Nico also did this I think)... Process modules are reserved for admin pages, they will get listed in the process field of admin pages. Also they're usually not autoload, as they're only loaded on demand, that's what Process modules are designed for.

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.