Jump to content

Search the Community

Showing results for tags 'files'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. The resume uploads fine, but everytime I try to access it, it says "this page is not intended for direct access". How would I make it so that link opens the file?
  2. Hello, today I've tried the following: Use .htaccess to rewrite the url conditionally if an image file was not found. Rewrite target was http://www.this-is-the-live-system.com/site/assets/files/$1 I guess that would work out great. Unfortunately Processwire checks to see if the file exists and outputs an error message in the Page Editor. An option to disable this check would be great. (Similar to $config->debugIf = '::1'; or something) It would be great being able to just use the live database locally without broken images all over the place. I guess this might be a simple good enough solution for most use cases.
  3. Hello Forum, I am relatively new to processwire and have been playing around with some simple websites so far with it. I love the simplicity and the straight forward approach to it. I felt "at home" right away! =D The only thing, I just can not get done is implementing a simple post-form in a template. (front-end) I want to get registered users to create content via a simple form. Yes, there are several tutorials in this forum. BUT: I want the file upload to look like the upload in the back-end: - multiple upload - rearrange order of files Is that hard to build? It should be "there"... or do i need to install a module like https://processwire.com/talk/topic/12050-module-jquery-file-upload/ I would like to build it with core functionality. What do you guys think? Can you point me into the right direction? Cheers Stephan
  4. Setup: PW version 2.7.1 dev template cache is disabled Chrome Canary is opened with disabled cache and in inkognito view mode When I make a change to a template file (say the basic home.php) I want to immediately see that change after refreshing the browser. Example: This is the content of home.php: <?php echo "bla"; I browse to the root page and see the "bla" output. I change the code to <?php echo "bla1"; and save the file. After that I immediately reload the page in the browser and I don’t see the change to "bla1". Only after multiple browser reloads (at times also more than 20 reloads) and "hard" reloads does the change appear. What I tried to do: set $config->dbCache, $config->sessionFingerprint and $config->sessionChallenge to false in config.php delete all sessions re-save the page in the ProcessWire backend and reload the browser page completely delete the browser history (cookies, cache, everything) after the first visit to the page Nothing helped. Questions: Can someone replicate this behavior? What can I do to achieve the desired behavior? Thanks a lot in advance for any help.
  5. Hi, I was wondering whether there was an easy way to protect files so that they are only available to the page that links to them? For example: if I have a client page template and add a file field type to it, then create the page and attach a file - I would like to be able to secure that file so that it can only be accessed by the person viewing the page. This way I can create a secure page and file that can only be accessed by a client logging in and accessing their page.
  6. Is it possible to upload zip file, unarchive it with save it structure? Thanks!
  7. Hi. I've just started using ProcessWire and the first issue I encounter is the lack of possibility to upload files to pages. I can upload images, but not files. I've tried to find an answer in the Forums, but with no success. What to do? Kind regards Hyldig
  8. Working on a site at the moment with lots of PDF downloads and was wondering how you handle these? In my ProcessWire projects so far, each PDF has generally be restricted to a single page. I normally create a field called Files and reference that in any CK Editor links. The problem I realised is that when one of these PDFs needs replacing, my client needs to remember every page where the PDF is referenced. With this site I'm currently building, I have multiple pages referencing the same PDF(s). In the CK Editor modal for linking files, I can of course choose a different page where the file "lives". I'm starting to wonder though if I should create a virtual Files directory which would simply be a container page with each sub-page representing and named after a file. This way, when my editors need to replace a file, they just need to replace and update in a single location. Any known cons of doing it this way?
  9. On the site for a game development collective I'm part of, I've been trying to add the ability for our developers to attach game builds from Unity (a 3D game engine and development environment) to blog posts. Unity cranks out an HTML file with everything ready to go for static hosting, so I've simply added a file field in the blog post template that accepts the four files Unity exports, one of which is jquery.min.js. Obviously, this is highly redundant, having the content author upload another copy of jQuery with each build, but it's actually a more streamlined workflow than the alternative of building a standard Unity player template, which would then require the author to create an additional page in ProcessWire each time to attach the Unity file. So I've gone with this redundant but easy approach. However, I've run into a technical snag: Even after explicitly allowing "min.js" files for the field, the file uploader always renames the jQuery file to "jquery_min.js", which is then not found by the HTML file looking for the original name. Is there a way to disable this behavior?
  10. Hello again! I'm moving my website: Norwegian to Polish dictionary http://lizus.net (ca. 28k pages) from Glossword to ProcessWire. Everything looks great except one thing: for each page there is created empty subfolder in site/assets/files. So I've got ca. 28k empty and unused folders which takes around 4kB each on my server (sic!). The same situation is with site/assets/cache :/ Is there any solution to improve this? Best regards, Remi Turala.
  11. Hello, Not sure I'm in the right section. I've just noticed something. In site > assets > files, there are folders apparently named after the id of the page in which the images are inserted in the admin. I'm developping a website locally this time, with version 2.5.0 now after an upgrade. It is the same for the first gallery rendered (before the upgrade) on it's own page and for the second gallery that've I've just rendered on the parent page of the page in which the images are inserted in the admin. For the first "gallery", the code is: foreach($page->children('include=hidden') as $child) { $thumb = $child->images->first()->width(320); echo "<a href='$child->external_url' target='_blank' rel='nofollow'><img src='$thumb->url' width='$thumb->width' height='$thumb->height' /></a>"; } (I've just updated this gallery code from width='320' height='200' to width='$thumb->width' height='$thumb->height') For the second gallery, it is: foreach($pages->get(1032)->images as $image) { $thumb = $image->width(90); echo "<a href='$image->url'><img src='$thumb->url' width='$thumb->width' height='$thumb->height' /></a>"; } For the first gallery, there are these versions: the original version (640x400), the .320x0.png version (320x200), in two folders a .300x212.png version (300x187 - perhaps old images with dimensions that I tested...(?)), and a .0x100.png version (160x100). For the second gallery, there are these versions: the original version (640x480), the .90x0.jpg version (90x68), and again a .0x100.jpg version (133x100). Where can I disable the creation of this .0x100.jpg version, in which file, is it "normal"? Thanks in advance !
  12. Hey guys, Not sure if any of you have had this issue before but I have some file upload front-end forms where the client is able to add new files, replace, update etc. Recently they have been having problems where some files when being replaced are failing (they become 0kb) - up until now I've been trying to figure out the pattern to produce this and it seems to be when replacing the existing file with a file with the exact same filename. Can anyone think of a PW or PHP reason why this might cause a problem? If not, I'm guessing it's something within the form code... Thanks.
  13. I think it would be a nice idea to add an image/field count to these inputfields. Something like below, where it says '(12)'. For me this would be a handy little addition.
  14. Hi guys, Hope you're all doing well. I haven't ever really considered secure files before on a PW installation but am currently trying to convert an unsecure system (the folders and files already exist) to a secure one. I've updated config.php to enable secure files and left the default "-" as the prefix but am a bit confused as to what is supposed to happen now. Are the folders supposed to be renamed automatically (doesn't seem to be the case at present) or is this something that only applies to new files? EDIT: Doesn't appear to be adding the prefix for new files either. Can someone tell me what the default behaviour is supposed to be here as I'm unsure whether this is the issue before I get any further. Thanks.
  15. Hi, today I installed a fresh copy of Processwire (2.4 dev) and now i wanted to upload some files and images on a page. when i select the files the ajax-upload works as expected (although there are no thumbnails). but after saving the page the input field is empty again and the files are gone from the page. in the filesystem the files are still existent. do you have any idea what could cause this problem? thanks! EDIT: when i turn on the console, I see the following error: POST http://localhost:8888/cms/page/edit/?id=1025 500 (Internal Server Error) InputfieldFile.js?v=107:252 uploadFile InputfieldFile.js?v=107:252 traverseFiles InputfieldFile.js?v=107:287 (anonymous function) InputfieldFile.js?v=107:297
  16. Hi everyone, I'm working on a project where users can upload images, using a jquery uploader (no $_FILES input in the form) : - User select images - Images are uploaded in a specific folder After that, how can i attach the images to a page ? I took a look to wireupload() but it seems to need a $_FILES input. Thanks for you help
  17. Hi, sorry, me again, I hope these nagging questions of mine may hopefully serve other people one day I have pages which contain files, which I can then link to students and I want to be able to flash up "New!" or some such like if the file has been added or updated within say 3 days. I've figured it out to check whether the page itself containing the file has been added or modified. $files = $file_page->files; foreach ($file_pages as $file_page) { $create_date = $file_page->created; $mod_date = $file_page->modified; $date_trigger = strtotime("-3days"); ?> <li><a href="<?php echo $file->url; ?>"><?php if ($file->description) {echo $file->description;} else { echo $file->name;} ?></a> <?php if ($mod_date>$date_trigger && $create_date<$date_trigger) {echo "Recently modified!";} ?> <?php if ($create_date>$date_trigger) {echo "New!";} ?> </li> Was wondering if it would be able to go one level deeper as I have some file pages with multiple files. If not, it's no big deal, but would be helpful. Thanks again.
  18. Hello, everybody! I've been experimenting with manipulating files through the API recently and I cannot get my selectors to work with Files. I read about subfield selectors but I cannot get the following code to work: $myFile = $page->get("basic_page_file.name=6121970044ELEPHPANT.jpg"); // field basic_page_file is of type "Files". if (!$myFile) echo "Nothing was found"; // does not get displayed echo "File name is " . $myFile->name . "<br />"; // nothing is displayed for '$myFile->name' Actually, neither error nor the name of the file get displayed. So, I am curious as to what the correct way to use subfield selectors with Files is?
  19. Hi guys, just wondering if there is a way of limiting the size of a file being uploaded through Wire Upload rather than server-wide? EDIT: Am also wondering how to output any errors the WireUpload should be outputting.
  20. Hello guys, I am setting up a page for news publishers to be able to upload PDFs. Some forum browsing helped a lot with gile uploads (thanks, Ryan!). However, I ran into a different kind of problem: I can add files to pages just fine but I do not know how to replace/delete them after! Let's say I have uploaded a file to a page. I can see it in the admin backend. Then I try to delete it using an API call ("file" is the name of a file field that I added to the basic-page template): $wire->pages->get("$refererPageId")->file->pagefiles->delete(); Doesn't work. Says, Error Call to a member function delete() on a non-object $wire->pages->get("$refererPageId")->file->delete(); does not work either. I've run out of ideas, and looking through the code did not help (I know php just enough to be able to use pre-defined functions). Could you please enlighten me on how to delete page files using the API Thanks a lot in advance.
  21. Hey guys am having a bit of trouble linking users to downloadable files (which are being stored in pages). Basically I have extended the user template to include a page field called "files_link" which links to the pages where the files are being displayed. On the user's profile page (front-end) I want to display a little welcome message then the files that they are allowed to access. This is my current code, can anyone help me figure it out? <?php include("./header.inc"); ?> <div id="profile_wrap"> <?php // user is logged in if ($user->isLoggedin()) { ?> <h2>Welcome back <?php echo $user->first_name; ?></h2> <?php $file_pages = $user->files_link; if ($file_pages) { $files = $file_pages->files; ?> <h6>Downloadable files</h6> <ul> <?php foreach ($files as $file) { ?> <li> <a href="<?php echo $file->url; ?>"><?php echo $file->description; ?></a> </li> <?php } ?> </ul> <?php } ?> <?php } else { ?> <h4>Sorry, you do not have access to this page, <a href="./login">please log in</a></h4> <?php } ?> </div> <?php include("./footer.inc"); ?> Thanks
  22. Hi, I'm currently trying to setup a multi server setup here and I was wondering if anybody has any experience in saving the /site/assets/files to a different server, currently I have a front-end templates server, a backend mysql server and a fileserver setup, I'm trying to implement PW into this flow, anybody has done this before? Kind regards!
×
×
  • Create New...