TOPIC:

Saving to DropBox Folder 6 years 4 days ago #151360

  • Topic Author
  • azhpo
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 16
  • Thanks: 0
Hi, I have everything set to work with Dropbox. It all works fine, all the forms submits (in this case pdf and attachments) are stored in a Dropbox folder.
But, eveything is stored in the same folder (eg. dropbox/submits). What I wanted is to automatically create an individual folder for every submit, because more than 1 file is stored for each user that submits a form (eg. dropbox/submits/user1, dropbox/submits/user2, and so on).

I hope I was clear explaining my issue. So instead of all files being stored in a single folder, I wanted a folder to every single user that sends a form submit.

Is this possible? With dropbox or any other file storage system?

Best regards.

Please Log in or Create an account to join the conversation.

Last edit: Post by azhpo.

Saving to DropBox Folder 6 years 4 days ago #151365

  • pedro81's Avatar
  • pedro81
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 15273
  • Karma: 287
  • Thanks: 1077
Hello,

it should work changing the file:
\components\com_breezingforms\facileforms.process.php

around the code line 7645:
$dbxClient->uploadFile('/'.($this->formrow->dropbox_folder != '' ? $this->formrow->dropbox_folder : $this->formrow->name) . '/' . basename($dropbox_file), call_user_func($space.'::add'), $f);

change it to:
$dbxClient->uploadFile('/'.($this->formrow->dropbox_folder != '' ? $this->formrow->dropbox_folder : JFactory::getUser()->get('name') == '' ? '_unknown_user_' : JFactory::getUser()->get('name')) . '/' . basename($dropbox_file), call_user_func($space.'::add'), $f);

this creates a new folder with the current user name.

Please Log in or Create an account to join the conversation.

Saving to DropBox Folder 2 weeks 2 days ago #261335

  • famouswebsites's Avatar
  • famouswebsites
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 33
  • Thanks: 1
This is the sort of solution I need but I think BF has been updated since this post, does anyone have a step guide for enabling Dropbox folders per username with a later BF version?

Please Log in or Create an account to join the conversation.

Saving to DropBox Folder 2 weeks 2 days ago #261336

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6455
  • Karma: 3
  • Thanks: 456
Hi,

yes, bf is updated in the meantime.

Please go to this path:
\components\com_breezingforms\facileforms.process.php
then in line 7807 you will see:
											'/'.($this->formrow->dropbox_folder != '' ? $this->formrow->dropbox_folder : $this->formrow->name) . '/' . basename($serverPath),
change it to this:
/'.($this->formrow->dropbox_folder != '' ? $this->formrow->dropbox_folder : JFactory::getUser()->get('name') == '' ? '_unknown_user_' : JFactory::getUser()->get('name')) . '/' . basename($serverPath), 

Let me know the result

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Last edit: Post by tihana.krivic.

Saving to DropBox Folder 6 days 1 hour ago #261698

  • famouswebsites's Avatar
  • famouswebsites
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 33
  • Thanks: 1
Hi Tihana,

First try copying your code didn't work but it put me in the right direction. I tried a couple of things and ended up with this:

//====----
$thisuser = JFactory::getUser();
'/'.($this->formrow->dropbox_folder != '' ? $this->formrow->dropbox_folder : JFactory::getUser()->get('name') == '' ? $thisuser->username : JFactory::getUser()->get('name')) . '/' . basename($serverPath), $file_to_upload
//====----

... which works perfectly.
A BIG thank you for your help ;)

Please Log in or Create an account to join the conversation.

Saving to DropBox Folder 5 days 20 hours ago #261701

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6455
  • Karma: 3
  • Thanks: 456
Hi,

super!

Np, anytime :)

If you need more help, feel free to ask

Regards,
Tihana

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.052 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!