Scoop -- the swiss army chainsaw of content management
Front Page · Everything · News · Code · Help! · Wishlist · Project · Scoop Sites · Dev Notes · Latest CVS changes · Development Activities
How to use File Uploads in Scoop Docs
By theantix , Section News []
Posted on Wed Oct 16, 2002 at 12:00:00 PM PST
Scoop now has the capacity for allowing users and administrators to upload files.  If you are interested in how to use this new feature, please download the nightly tarball and read this document for instructions.

Three types of uploads

There are three types of uploads possible: content, admin, and users.  Access to each is controlled by a separate perm.  There is an additional toggle for file uploads, controlled by the Site Control "allow_uploads".  If this is unselected it will override any permissions and uploads will function at all.

Content uploads are for uploading files to special pages or stories.  If the user has the perm "upload_content", they will have a new input box at the bottom of the submit story and special pages forms.  If the user uploads a readable file, scoop will take the content of that file and place it in the content of the story or special page as if the user had typed it themselves.

User uploads are for allowing file storage on your server to the users of your site.  If the user has the permission "upload_user", they will see an upload form appear at the address http://www.mysite.com/user/mynick/files, along with a listing of any files they have uploaded.

Administration uploads are for allowing a site admin to upload and manage files on their server from a web browser without requiring ftp.  If the user has the permission "upload_admin", they will be see a list very similar to the user files list above, and be able to upload files to that areas.

Configuring File Uploads

Aside from the "allow_uploads" site control and the permissions outlined above, there are several other site controls that should be set in order for file uploads to work correctly.  The site control "upload_user_quota" places a limit on how much disk space each user can take up, measured by KB.

The site controls beginning with "upload_path_" set the path on the filesystem that scoop will save the files to.  These must be directories that exist, and must be writeable by the apache user.  However, when a user uploads a file, scoop will create a subdirectory for each user using their user id number as the new directory name.

The site controls beginning with "upload_link_" set how scoop will link to the files once they are uploaded.  This setting will depend on how your apache is configured, but it will be how apache views the path in the respective "upload_path_" site control.  This is important for any of the functions that link to the file.

Additionally, you can configure scoop to allow a user to delete or rename files once they have been uploaded.  Depending on your userbase you might want to prevent your users from doing this because it can break stories that use those files.

The user_files_list box

There is also a new box in scoop, the user_files_list box.  If you place this box in your submit_template, you can use this to allow a convenient interface for users to insert IMG tags into their stories.  If they have javascript enabled, the box will allow users to use a drop-down box to select an uploaded file, and press a button to insert the correct tag into the intro or body text of the story.

Future Plans

  • integrate the files into the database in a table
  • move images to another location when used in a story, and delete those images when story gets deleted.
  • make the admin uploads more flexible so that it is possible to upload to multiple paths
  • a way to move files between upload areas
< Linking to custom pages... | www.ie-ap.org goes scoop >

Menu
· create account
· faq
· search
· report bugs
· Scoop Administrators Guide
· Scoop Box Exchange

Login
Make a new account
Username:
Password:

Poll
File Uploads
· Great! 66%
· Looking forward to the items in the future plans 0%
· - 16%
· theantix was here 16%

Votes: 6
Results | Other Polls

Related Links
· Scoop
· nightly tarball
· http://www .mysite.com/user/mynick/files,
· More on Docs
· Also by theantix

Story Views
  54 Scoop users have viewed this story.

Display: Sort:
How to use File Uploads in Scoop | 8 comments (8 topical, 0 hidden)
And then there were two... (none / 0) (#1)
by vwX on Thu Oct 17, 2002 at 09:46:24 PM PST

http://scoop.kuro5hin.org/story/2002/10/8/151953/724



And then there were 3... (none / 0) (#4)
by MadCat on Fri Nov 01, 2002 at 08:01:18 PM PST

I knew I should've come here before going on a box-coding rampage last night :)

My Scoop site is a game resource site and needed one of those nifty screenshot sections, but I wanted to have it integrated with Scoop as much as possible, so I ended up writing some file upload code and some new ops for it. I might actually post it here or there some time in the future but so far it's proven to be.. unstable :)

I'm going to try this one out and see if I can work it into what I need :D
--
A witty saying proves nothing, but damn it's funny!



Does the upload script do any referrer checking? (none / 0) (#6)
by adam on Sat Nov 09, 2002 at 12:15:54 PM PST

It would be nice if Scoop would reject requests with a referrer coming from a different site.  This would keep people from using the upload feature to host their ebay auction pictures and crap like that.  I know its possible to do this manually by adding a few lines to the Apache config, but it seems like it would be easier if Scoop could handle this directly.

Also, are there any checks in place to restrict what types of files are uploaded.  I don't think it would be a good idea to allow the upload of executable files.

Another nice (but not really necessary) feature would be to limit the maximum size of a single image.  A limit around 640x480 or 800x600 would prevent images from screwing up the page formatting.



dtvrvrct (none / 0) (#8)
by brg8 on Tue May 27, 2008 at 11:01:48 AM PST

منتديات-شات-دردشة-دردشه-شات كتابي-دردشة كتابية-شات صوتي-دردشة صوتية-شات سعودي-دردشة سعودية-شات الغلا-منتديات الغلا-تحميل العاب-برامج كمبيوتر-كتب مجانية-برامج جوال-مقاطع بلوتوث-مسجات-نغمات-ثيمات-العاب جوال موبايل-تصاميم-هكر-صور-صور انمي-اخبار الفن-صور فنانين-افلام-افلام اجنبية-اناشيد-صور سيارات-كاس امم اوروبا-تحميل اهداف-محمد-سياحة وسفر-منتدى النقاش-منتديات عامة-منتديات اسلامية-صور كاريكاتير-منتدى تعارف-نكت-الغاز-خواطر-قصائد-شعر-قصص-اساطير-روايات-حكم وامثال-ازياء-منتديات عروس-المطبخ-اطفال-طب-علم النفس-منال العالم-مركز تحميل-دليل مواقع-1-2-3-4-5-6-7-8-9-برق<span lang="en-us">-19-p1-p2-p3-p4-78-71-20-21-59-60-58-61-67-53-56-9-a9-a1-a8-a12--a15-a16-a18-ماسنجر</span>-صور بنات-51-26-a<span lang="en-us">-b-c-d-e-e-f-g-h-j-l-29-43-47-13-6-dd-p18-f8-12-62-65-49l-f11-f86-مسجات حب</span>-مسجات عتاب-مسجات شوق-مسجات مقالب-مسجات نكت-مسجات حلوة-صور حب-صور بنات-شات بنات-دردشة بنات-شات الحب-دردشة الحب-دردشة كويت 25-اغاني هيفاء وهبي-دردشة بنت السعودية-عمرو خالد-ناصر الفراعنة-صور نانسي عجرم-ياسر القحطاني-شات بنات عوانس-نغمات نوكيا-قصص-هشام الراشد-تامر حسني-العاب-





How to use File Uploads in Scoop | 8 comments (8 topical, 0 hidden)
Display: Sort:

Hosted by ScoopHost.com Powered by Scoop
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest © 1999 The Management

create account | faq | search