I want to upload an image to a server. I used the code from SO question: Blackberry jde : how to upload an image in server using MultipartPostData
But the image is not uploaded to the server.
Are you 100% certain that the URL you are POSTing to is valid?
HTTP 404 is "resource not found"; for a POST that would typically mean the CGI program, script or controller is not at the path you've given.
Related
The following approach was used to create a url for direct uploading to s3.
a = ActiveStorage::Blob.create_before_direct_upload!(input.to_h)
a.service_url_for_direct_upload
This was working very well in rails5.2 but after we upgrade to rails-6.0, the url generated by this method is thrown as forbidden url(i.e. 403 response) from s3. But this is not with all the cases. Images uploaded from mobile gallery to this url are uploaded successfully, but some images uploaded from camera are not uploaded and responded with 403 message from s3.
I've uploaded an image for my website on s3 but it doesn't display on my website. It works fine on my localhost, as the picture is in my assests/images folder of my Rails 5 app, but not on Heroku. When I inspect my page, I do see an error for the file my code is looking for: Failed to load resource: the server responded with a status of 404 (Not Found) .I do believe I have my Heroku set up right with my amazon s3 bucket because I can see users' pictures being sent to it. I'm looking to use this picture as a background for part of my landing page. Any help would be great, thanks.
I made the image inside my 's3 bucket' public so that it could be accessed by my website. Also, I changed my url for the image in my Rails app to the new url provided by amazon s3.
How to send files to MUC Rooms using XMPP Framework?
I have searched a lot about this.
Using the SI method i get error 503 service unavailable or Wrong JID ,but how to pass a resource for groupchat ?
I had used the method to transfer image using string data but now its not up to my needs. I read that we can upload file to server and send the link instead. I'm using openfire server.
If anybody has some insight about this please share. Any help is appreciated. Thanks !
Yes you can upload your image to a server and send the link.
The flow goes like this:
You need to send a thumbnail image using xmpp (and the link of the original image stored on server), like you must be sending the entire image now in your application.
When the user clicks on the thumbnail image, you can download the original image from the server using that link.
I have integrated slack in my custom application using the API provided by Slack.
I am able to fetch the post from Slack and able to display it in my application. I am able to fetch the image that was uploaded with the post (Few days back) but today when I added a post with the image. The image is not being displayed in the application, when I am trying to access the image URL in the browser it is asking for Authentication.
I am accessing the slack rest API to fetch the post from slack. from the response I am taking the "thumb_64" parameter from the "file" object.
I am able to access the below image URL, this image was uploaded on 2016-01-11
https://files.slack.com/files-tmb/T0F8RH7U7-F0J505EG1-33434fadf3/screenshot_from_2015-12-28_15_23_39_160.png
But I am not able to access the below mentioned URL ,this image is uploaded on 2016-02-16
https://files.slack.com/files-tmb/T0F8RH7U7-F0MHZL70Q-d740ed784b/configration_160.png
Thanks & Regards,
Have you seen the update where #slackapi announced about accessing files using the Web API?
Essentially, you now need to provide authentication to access file assets, by specifying an HTTP Authorization header with an OAuth token that has the correct scopes to access that kind of data for a team.
For example, you'd send a header like this with your GET request:
GET https://files.slack.com/files-tmb/T0F8RH7U7-F0MHZL70Q-d740ed784b/configration_160.png
Authorization: Bearer YOUR_VALID_ACCESS_TOKEN_HERE
The File type documentation goes into further detail.
I have a rails application that uploads and displays images from Amazon S3.
I also have an issue displaying some of these images in Chrome!
Take, for example, the following link:
http://s3.amazonaws.com/lafamos-dpk/system/images/2144/thumb/photo_2144.png?1333998967
This just doesn't load in Chrome, but loads just fine in Firefox and Safari.
In a truly mysterious fashion, this image, which was uploaded through the same system, to the same Amazon S3 bucket, loads just fine [granted, it's a different format, but I'm not sure that matters].
Here's a link to the page I'm trying to solve these problems on -- the photos under the Press Photos section all the way down at the bottom are just not showing up at all in Chrome.
Any ideas what's going on here?
Thanks!
Yuval
When you view the site in chrome you're getting a few error's
Failed to load resource: the server responded with a status of 404 (Not Found) https://lafamos-dpk.s3.amazonaws.com/system/main_photos/58/small/artist_58.jpg?1291229622
.
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Key>system/main_photos/58/small/artist_58.jpg</Key>
<RequestId>1F57BF9D9034CB18</RequestId>
<HostId>
U9HkrMYA6nISFRCt2cQ0Xy89uxkzBnJ2pDmlPz/yiCL4Wb74h9hlIg8eVU46+R7y
</HostId>
</Error>
Does the image exist?
Direct links of the images work fine on both Chrome and Firefox, but your img src links seem to be broken. I'm getting this in the DevTools console:
Failed to load resource: the server responded with a status of 404 (NOT FOUND) http://flipsidetomusic.com/wp-content/uploads/2011/02/album_63.jpg
Port: Could not establish connection. Receiving end does not exist. lastError:29
set lastError:29
Port: Could not establish connection. Receiving end does not exist. lastError:29
set lastError:29
I'd look into resolving that 404 Error. Also, I came across a HackerNews' discussion today that may point to the problem's source: https://news.ycombinator.com/item?id=5514344
Apparently Firefox doesn't block non-SSL content on SSL pages by default, but Chrome does. I'd check your S3 bucket permissions, granted, I'm not very familiar with AWS.