Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Error 404 using upload method of SC's PHP class

Featured Replies

I have a web page that allows users to upload files using normal HTTP upload.  The PHP page to process the upload uses PHP's standard move_uploaded_file() function to get the user's file into a known directory, called "docsTemp" on this system. That works. My script then calls the the upload method of SC's PHP class to move the file into the SC directory. That SC step fails with error 404 (not found).

 

The goal is to move the file from docsTemp to a nested folder inside the SC folder. The script specifies a section/subsection folder structure. SC, when used through FM web viewer, will create folders as specified by the web viewer URL. So the folder I would expect my PHP script to create would be supercontainer/section/subsection/pkID. But instead, SC is creating folders named "0","1", "2", "3"..."9" that do have the uploaded file. After 10 attempts, the SC upload cycles back to moving the files into folder 0, then 1,2,3 thru 9. 

 

Why is SC not creating folders like it does through FM web viewer?

 

 

 

 

 

 

  • Author

:laugh:The Solution to this problem turned out to be the SC Base URL, again. Our new SC installation confused me. On my  development server, running SC in standalone mode, there is always a SuperContainer folder that holds children folders "Files" and "thumbnails." On new host's server, running SC in Tomcat, we have a "supercontainer" folder which holds the individual files and no "Files" folder. On the new server, the thumbnails folder is a sibling of supercontainer folder.

 

My host said the SC url is  http://domain:port/supercontainer. It turned out that despite the lack of a Files folder, the url still needs to have that word. So the base url is http://domain:port/supercontainer/Files. 

 

I previously posted about a similar upload problem and the solution was the same. Kinda confusing... No Files folder but you still have to add "/Files" in SC_BASE_URL.

 

Gary

 

:hairy:

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.