Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Bulk Uploader Module: Testers needed!


Go to End


57 Posts   19189 Views

Avatar
UncleCheese

Forum Moderator, 4102 Posts

10 January 2009 at 4:33am

404 error..

Interesting. The leading slashes seem to be the problem.

Changing the upload_url and file_destination_path are not going to change anything because those are all set in the BulkUploader_Controller when the field is instantiated.

Go to that section of the BulkUploader_Controller code (line 130-ish)

		$fields = new FieldSet(
			new SWFUploadField("UploadForm","","",array(
				'file_upload_limit' => '100', // how many files can be uploaded
				'file_queue_limit' => '100', // how many files can be in the queue at once
				'browse_button_text' => 'Choose files...',
				'upload_url' => '/'.$this->RelativeLink('handleswfupload')
			))
		);

try removing the leading slash on upload_url

Almost there! Thanks so much for all your testing.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

10 January 2009 at 4:34am

Individual file selection is a priority for this weekend. I know exactly what I need to do. Just a matter of finding the time.

Avatar
Amir Mostofi

Community Member, 59 Posts

10 January 2009 at 12:28pm

The 404 error message was definitely related to the 'upload_url' being incorrect.
The only way I have been able to get the uploader to work is to define an absolute url as below

'upload_url' => 'http://localhost/silverstripe/'.$this->RelativeLink('handleswfupload'),

Note: I am testing this on a local server for now.

It baffles me why the following relative url would not work, but it does not.

'upload_url' => $this->RelativeLink('handleswfupload'),

BTW, I am looking forward to the 'individual file selection' implementation this weekend.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

10 January 2009 at 4:41pm

Yup. I've confirmed this bug. The latest revision has Director::absoluteURL() wrapped around every file path. That should clean up any ambiguity.

Do you use SVN? You can start checking out my daily builds.

I'm halfway through the file selection. Should be done tomorrow.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

11 January 2009 at 2:11pm

The individual file selection feature is ready for testing. You can do an SVN checkout of the latest versions here:

http://svn.codespaces.com/carlinowebdesign/bulk_uploader
http://svn.codespaces.com/carlinowebdesign/swfupload

Avatar
Amir Mostofi

Community Member, 59 Posts

12 January 2009 at 12:35pm

Edited: 12/01/2009 12:36pm

I have installed the latest svn files and did a dev/build.
In the Manage Files section on the right, I see the drop down menu "--Import from folder--" without any import button, but when I select a folder, nothing happens. What am I supposed to see? How is this supposed to work?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

12 January 2009 at 5:20pm

The contents of the folder should blind down after a folder is selected. See the Resources page at this demo:

http://sandbox.carlinowebdesign.com/admin
u: admin
p: password

If it doesn't work there, let me know what browser you're using. It's probably a javascript issue.

Avatar
Amir Mostofi

Community Member, 59 Posts

12 January 2009 at 5:43pm

I can see it using your sandbox, so the issue is not browser related. I wonder if it's once again related to defining an absolute URL instead of a relative one. What is actually loading in that iframe and where can I change its url to define an absolute url?

By the way, when I select the Uploads folder (which has a lot of files), in Safari I do not get a vertical scrollbar (which I get in Firefox), Hence, the list is prematurely cropped and I cannot see the "import selected file(s)" button down the bottom. I have not tested this in IE. You may want to look at how you have defined the iframe. The overflow appears to be hidden.

Also, it might be worthwhile to properly indent the nested folders so that you can see the folder hierarchy. Just a though!