Does anyone know the endpoint for getting all of the iamges you uploaded to the media libray in one request?
Im using next js with strapi and need a way to grab all of the images from the media library but there doesnt seem to be any documentation on this
/api/upload
GET /api/upload/files Get a list of files
GET /api/upload/files/:id Get a specific file
POST /api/upload Upload files
DELETE /api/upload/files/:id Delete a file
Reference
https://docs.strapi.io/developer-docs/latest/plugins/upload.html#configuration
GET /upload/files
You can read more on the docs
Related
I am trying to download content of a previous revision of a file using the google drive api for Ruby Google::Apis::DriveV3::DriveService#get_revision:
Tempfile.create('file_revision-', encoding: 'ASCII-8BIT') do |temp_file|
drive_api_service.get_revision(file_id, revision_id, download_dest: temp_file)
# work with the content
end
I keep getting Google::Apis::ClientError with status code 403, reason phrase "Forbidden". The scope https://www.googleapis.com/auth/drive is enabled and the error occurs only when I am trying to download the content of the revision. If I run the code without the parameter download_dest, the request succeeds without any problems. I am also able to fetch any meta data or revision, export files, upload files etc., the problem only occurs when I try to fetch the content, either by get_file or get_revision.
Has anyone encountered this issue?
Is there an additional permissions that specifically needs to be added to allow content downloading?
I have also looked at other questions on stack overflow and I have checked all possible configuration for google drive api I could find and everything seems to be enabled.
Right now, Google drive api does not support content downloading for native google drive files (google docs, sheets etc.), so you cant download content (current or of an old revision), you can only export it to a different mime type.
I have uploaded as per Oracle Documentation but didn't get in same format. here is postman screenshot next when get request for same file is here after getting from server.my docx file
please let me know what i missed. thanks in advance.
You used POST in your postman call, instead of PUT.
POST in this case is used as the command for creating or updating the metadata, not the object.
Try it with PUT instead.
See the Oracle Cloud Storage documentation for this as well.
Hi I'M new to windows phone Application development i'm working on how to get access the files from google drive using rest api i got the response in the response i got all the information like .pdf,.docs,mp3,mp4 ,folders etc...and the response is coming slow from the web for that is there any solution that.I should get response only that contains images and folders so that app will fast and accuracy... Thanks in Advance.
https://www.googleapis.com/drive/v2/files?q=mimeType contains 'image/jpeg'
The above link is for getting only images in this way according to mime type we can get the files rather than getting all files at a time
I'm currently trying to upload image using ASP web API and save it in my Azure server using this tutorial
Then I took the request stream using Request.Content.ReadAsStreamAsync().Result and send it to Azure using blob.UploadFromStream(stream);
The file got uploaded and when I fetch the URL it returns something like
http://testing.cloudapp.net:10000/devstoreaccount1/saveFiles/File_2_2.zip
I tried the link but it just returns a blank page.
Any idea why I can't download my uploaded file back?
It turns out I should just use blob.UploadFile(fullLocalPathFileName) instead of blob.UploadFromStream(stream). You can get the full local path of your file from the MultipartFormDataStreamProvider and just send it easily to the blob.
I have an mp3 file in an S3 bucket. I am fetching this file via ajax GET request for html5 audio playback. Intermittently, the get request will fail to download the file and thus the track will not play. The request returns "206 partial content." Oddly, it will work several times before failing and then continuing to fail.
If I disable caching in my browser (chrome), the file will download and play appropriately.
Have I configured s3 incorrectly? How can I get this mp3 file to download and play consistently?
specific file is located here: https://s3.amazonaws.com/1m40s_dev/assets/music/walden.mp3
thanks!
I've found this often relates to the MIME type set on the S3 hosted file.
Setting the correct MIME type seems to fix things.
On a side note, I struggled with a single binary file always breaking in IE. Its MIME type was application/octet-stream. I changed the MIME to binary/octet-stream and that seemed to fix downloads from IE. Not sure why.
use amazon cloudfront solve the problem
I solved this by appending a timestamp to the end of the mp3 url on page load. This forced a new download of the content each time and eliminated the caching error.
This feels more like a work around than a fix. I still don't know the root cause of the issue but if you find yourself having a similar problem and just need to move on, add a timestamp or random number as a param at the end of the url
.../assets/music/walden.mp3?[timestamp]
One other workaround I've found is, if you're using rails, turning off turbolinks makes this go away on chrome. I'll add more to my answer as I discover more.